Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Dec 7, 2017 · 8 comments

Comments

@vimeitor
Copy link

vimeitor commented Dec 7, 2017

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
Copy link
Owner

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
Copy link
Author

vimeitor commented Dec 7, 2017

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
Copy link
Owner

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

@vimeitor
Copy link
Author

vimeitor commented Dec 7, 2017

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
Copy link
Owner

yangmillstheory commented Dec 7, 2017 via email

@vimeitor
Copy link
Author

vimeitor commented Dec 7, 2017

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

@yangmillstheory
Copy link
Owner

yangmillstheory commented Dec 8, 2017

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
Copy link
Author

vimeitor commented Dec 8, 2017

Cannot reproduce the issue either with your mapping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants