-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Moving the cursor to somewhere outside of the viewport should center the cursor vertically #2960
Comments
When an action causes the cursor to move outside of the viewport, center it vertically in order to better mimic Vim's behavior. Fixes VSCodeVim#2960
When the cursor is moved to outside of the viewport, center it vertically in order to better mimic Vim's behavior. Fixes VSCodeVim#2960
Checking if there's an update or a workaround for this bug. For example, a keybinding that might center the screen after the search. |
Looks like |
@naseer I'm not sure what EDIT: |
Digging into this a bit more. In vim, if you put the cursor at the top of the viewport with Seems going to marks behaves the same way. I think we should center if the cursor is 15 or more lines outside the viewport, which should also prevent issues such as #2998 |
…e cursor at least 15 lines off screen Fixes #2960
The above commit (4434) seems to behave unexpectedly around heavily folded code. If I'm traversing lines (simple cursor movements like jk) in a non-folded section of code, the cursor works just fine. When I'm doing the same amidst many folds, cursor navigation behaves almost like a scrollOffset is set (keeping the cursor in the center always). |
@pnalchajian Please file a separate issue |
Same issue that @pnalchajian mentioned. Not sure if he has created a new issue for this or not. |
Describe the bug
A couple of examples of the situation described in the title:
/
and the next occurrence is outside of the viewport, the cursor line is placed at either the first or second from last line in the viewport.To Reproduce
Steps to reproduce the behavior:
x
in a file withma
.x
is outside of the viewport.'a
.Expected behavior
The cursor line
x
should be vertically centered.Screenshots
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: