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

Cancelling an incremental search doesn't reset screen to cursor position #2972

Open
ConnorKrammer opened this issue May 24, 2022 · 0 comments

Comments

@ConnorKrammer
Copy link

Describe the bug
Starting an incremental search and then cancelling out of it via Escape (without ever hitting Enter to confirm the search pattern) leaves the screen scrolled to the first match instead of returning it to where the cursor actually is, in its original position.

To Reproduce

  1. Create a text file that is taller than the screen and requires scrolling
  2. Put some target search string at the end of the file and scroll to the top, so it's off screen
  3. Start an incremental search for the target search string, but do NOT hit Enter to confirm the search pattern
  4. Cancel out of entering the incremental search with Escape
  5. Observe that the screen remains scrolled to the line with the search target

This applies to searches in the reverse direction as well.

Expected behavior
In gVim, this set of steps should return the scroll position to where it was before starting and then cancelling the incremental search. In VsVim, the cursor is left behind off-screen and the screen will not scroll back to it until something sets the scroll position (e.g. moving the cursor).

Environment (please complete the following information):

  • Visual Studio version: 2022 Version 17.2.1
  • VsVim version: 2.10.0.5
  • Programming Language: C
  • ReSharper: No
  • Visual Assist: No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant