Open shaladdle opened 7 years ago
This appears to be a VSCode behaviour as you move past the second to last bottom line in the window it auto scrolls the window one line up.
@Chillee I haven't really used Vim for anything more than quick config file edits, but L stops 5 lines from the lowest line. I think it's to keep the lower area clear for a pop-up buffer. It seems like a [hack] solution here would be to stop at the next to last line in VSCodeVim. I know that I personally would prefer that behavior over the current "ratchet" scrolling.
I implemented a move to last line then up one, but the problem is the initial move to last line still causes the scroll.
The problem is the vscode api does not give us any way of knowing what the bottom displayed line is, they only give us a command to move to the bottom displayed line :/
@xconverge I think this is a VSCode API mistake. VSCode effectively simulates a :set scrolloff=1
, and H
and L
should respect that scrolloff.
@rebornix ?
Yes I agree
What's weird is that with editor.cursorSurroundingLines
> 0, H
and L
both have the same (buggy) behavior, but with editor.cursorSurroundingLines
= 0, only L
has the buggy behavior and H
doesn't.
editor.cursorSurroundingLines: 2
: LLL
scrolls down 2 lines at a time (bug), HHH
scrolls up 2 lines at a time (bug)editor.cursorSurroundingLines: 1
: LLL
scrolls down 1 line at a time (bug), HHH
scrolls up 1 line at a time (bug)editor.cursorSurroundingLines: 0
: LLL
scrolls down 1 line at a time (bug), HHH
doesn't scroll up (correct!)Maybe that's a helpful lead for debugging this?
Friendly ping -- any update on this issue?
when you press L vim actually did 1 + L , but there is a bug in vscode that scrolls down one so you can press 2 + L to fix it
Please thumbs-up 👍 this issue if it personally affects you! You can do this by clicking on the emoji-face on the top right of this post. Issues with more thumbs-up will be prioritized.
What did you do?
I pressed L in an editor window.
What did you expect to happen?
The cursor should go to the last visible line of the current file.
What happened instead?
The cursor went to the last visible line of the current file and the the window scrolled down to reveal the next line after that. If you were to keep typing L, you would eventually scroll to the bottom of the file. In Vim this is not the behavior.
Technical details: