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

Find Backwards (Comma) Doesn't Function Correctly #4313

Closed
HawkinsT opened this issue Dec 1, 2019 · 3 comments · Fixed by #4314
Closed

Find Backwards (Comma) Doesn't Function Correctly #4313

HawkinsT opened this issue Dec 1, 2019 · 3 comments · Fixed by #4314
Labels

Comments

@HawkinsT
Copy link

HawkinsT commented Dec 1, 2019

Describe the bug
When finding a letter using 'f' or 'F' (find backwards), ';' will keep finding the next occurrence in the same direction. Likewise, ',' should find the next occurrence in the opposite direction to the f/F command, but instead it reverses direction every time (so repeatedly hitting ',' will just switch you between the same two letters).

To Reproduce
Steps to reproduce the behavior:

  1. Take the string, 'a a a a a a'
  2. While in command mode highlight the first letter and hit 'fa;;;'
  3. You will now be at the fifth occurrence of 'a' in the line.
  4. Now hit ',,,'
  5. You will go back to the 4th 'a', then the 5th, then back to the 4th.

Expected behavior
In step 5 the expected vim behaviour is to keep searching in the same direction when hitting ',' (so you should end up on the second instance of 'a'), just as with '/aNNN' or ?aNNN.

Environment (please complete the following information):

  • VSCode version: 1.40.2
  • OS: Windows_NT x64 10.0.18362.476 (Win 10 Pro)
@J-Fields
Copy link
Member

J-Fields commented Dec 1, 2019

I'm not able to reproduce.

@HawkinsT
Copy link
Author

HawkinsT commented Dec 1, 2019

Hmm. I'll play about with it Monday and I'll try to narrow down the cause then. It's definitely a persistent issue for me.

@J-Fields
Copy link
Member

J-Fields commented Dec 1, 2019

Ah! Nevermind, I use vim.sneakReplacesF which works just fine in this example. With that turned off, it's clear this is a bug.

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

Successfully merging a pull request may close this issue.

2 participants