yangmillstheory / vim-snipe

MIT License
118 stars 8 forks source link

Jumping to a target, undoing, and trying to jump to any target with the same letter jumps to the first option #24

Open vimeitor opened 6 years ago

vimeitor commented 6 years ago

Mappings

omap l (snipe-t) omap L (snipe-f) omap h (snipe-T) omap H (snipe-F)

Steps to reproduce

"this is an example sentence" If we try to jump to any target with the letter e (with snipe-t, for example) we get "this is an example santsncd" Jump to any character. Undo. Try to jump to any target with the letter e. You get none, and it automatically leaves: "sentence" since it's what you would get if it jumped to the first target

yangmillstheory commented 6 years ago

Sorry can you provide the vim commands to reproduce? The great thing about Vim is that we can be precise with what we're doing.

Also, are you missing some mappings? I only see mappings for operator-pending mode, these functions work in Normal mode and Visual mode as well.

vimeitor commented 6 years ago

Thank you for the answer. I actually only have omaps, since that's what I use the most.

For the sentence, I just press dle, select target (for example, f), then undo, then press dle again (so the whole thing would be dlefudle. Here's how it looks: https://asciinema.org/a/bDROwXBDBQQNbTV8Lu7f9jCNs

yangmillstheory commented 6 years ago

OK. So to clarify the expected result is to re-highlight the targets, right?

vimeitor commented 6 years ago

Yes, I would expect so. Did you have something else in mind? By the way, thank you very much for this plugin. It works really well and it's very fast.

yangmillstheory commented 6 years ago

No just wanted to confirm.

You're welcome.

Are you interested in taking a shot at a fix?

May not have time to get to this in the next few days.

On Thu, Dec 7, 2017, 1:46 PM Adrià Farrés notifications@github.com wrote:

Yes, I would expect so. Did you have something else in mind? By the way, thank you very much for this plugin. It works really well and it's very fast.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/yangmillstheory/vim-snipe/issues/24#issuecomment-350104156, or mute the thread https://github.com/notifications/unsubscribe-auth/ACmkd-ib_E7MSZoinw3W4Ut6JK-cBkF-ks5s-Fy_gaJpZM4Q6AqW .

vimeitor commented 6 years ago

I'm submitting a fix in a few minutes. Can you make sure I'm not breaking anything? This seems to fix it.

yangmillstheory commented 6 years ago

Do you have the same bug when you use (snipe-f)? I can't seem to reproduce with the mapping

map <leader><leader>f <Plug>(snipe-f)

can you verify?

Here's the result for (snipe-f).

bug

(snipe-t) is the same.

vimeitor commented 6 years ago

Cannot reproduce the issue either with your mapping.