Open ASC95 opened 5 years ago
I am not sure whether this is related, but it seems so, so instead of opening a new issue, I add it here: I'm at the end of this file. There's a bunch of appearances of e
before my pointer. I press ?
and then e
. Instead of moving me to the closest appearance of e
in my immediate neighbourhood, it bounces to some arbitrary point high above. It returns only after I continue for the second character. Check the gif.
Describe the bug When I reverse-search using "?", the result is correctly found. However with large files, the window often (but not always) shifts downward so that the found pattern is displayed at the very top line of the window.
To Reproduce
Expected behavior I expect reverse-search "?" to behave the same as forward search "/" with regard to when the window shifts around.
When I forward-search for a pattern, the window only moves if the pattern is found outside of the visible range of the window. If the pattern is already in the visible window, then the cursor moves to the pattern and the window does not change.
When I reverse-search for a pattern, I want the same thing to happen. The window should only shift if the pattern does not exist in the visible window. Otherwise, the cursor should move to the pattern in the visible window and the window should not move at all.
Screenshots First image: I am forward-searching "/are" to highlight the pattern "are". That is the pattern I'm going to eventually search for using reverse search. Cursor is on line 43.
Second image: I have typed"?a", which is part of the eventual search for "?are". The window has shifted elsewhere in my document as it matched "a".
Third image: I have finished typing "?are", and the match on line 41 is now annoyingly displayed at the top of my window. What should have happened is that the window should not have moved at all (see image 1), but the cursor should have moved.
Environment (please complete the following information): MacOS 10.14.6 VSCode version 1.32.3 VSCodeVim version 1.2.0