Vim: Scrolling with <C-e> and <C-y> is very laggy

Created on 30 Nov 2019  路  7Comments  路  Source: VSCodeVim/Vim

Describe the bug
When holding down (or quickly tapping) <C-e> or <C-y>, scrolling soon becomes very laggy and the editor only scrolls at a rate of about two lines per second. The keystrokes get queued up and after letting go of the keys the editor continues to scroll slowly and try to catch up.

<C-u> and <C-d> don't suffer from this problem. I noticed in the source that they don't use vimState.postponedCodeViewChanges.push() and instead call vscode.commands.executeCommand() directly. Maybe this has something to do with it?

Similar to #1943 and #1985

To Reproduce
Steps to reproduce the behavior:

  1. Using the latest stable (or insider) version of VS Code on Mac, run /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code --user-data-dir /tmp/something.
  2. Ensure only the latest VS Code Vim extension is installed.
  3. Open a file and try <C-e> or <C-y>

Expected behavior
Performant scrolling

Screenshots
Screen Shot 2019-11-30 at 3 35 04 PM copy

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.11.3
  • VSCode version: 1.40.2 (or 1.41.0-insider)
  • OS: macOS Catalina 10.15.1 (19B88)
areperformance

Most helpful comment

This is fixed in master, will be in a release soon.

All 7 comments

FYI: I fixed this for myself like this, however I don't know the ramifications of that change.

I hadn't noticed this before, but you're absolutely right. @raiskila would you mind submitting a PR? I'll need to dig into the code to see whether calling editorScroll immediately would cause issues, but it's at least a start. I really appreciate you investigating!

I am now getting a problem with my "fix" where if the cursor is at the bottom of the screen, moving up with <C-y> doesn't work anymore. It seems like that may not be the correct way to fix the issue. Would you like me to create a PR anyway?

Yup, just mark it as "WIP" please. Thanks!

For your info, maybe this helps:
...removed this was problably wrong

No progress?

This is fixed in master, will be in a release soon.

Was this page helpful?
0 / 5 - 0 ratings