I set the editor.cursorSmoothCaretAnimation
to true
in Visual Studio Code but the cursor lags behind when I type/select/delete text quickly:
I turned off all the extensions in VS Code by running code --disable-extensions
in terminal but the problem persists.
How can this be fixed?
tl;dr: I had set editor.smoothScrolling
to true
. Disabling that option (mostly) solved the issue:
The cursor does not stutter as much in person as it might look like it does in this gif. There is still a little bit of lag - about 1 to 1.5 characters, but not more than that. This is actually the same amount of lag I was seeing when every extension was disabled and all settings except editor.cursorSmoothCaretAnimation
were commented out, which tells me that the lag can't be reduced any further (or at least I can't reduce it any further).
Initially, I had disabled extensions temporarily by running code --disable-extensions
in terminal but that didn't seem to solve the problem. So, I went ahead and manually disabled each extension (globally) and also commented out all my settings in the settings.json
file, except editor.cursorSmoothCaretAnimation
. Thankfully, I found that the cursor lag had reduced to about 1 to 1.5 characters. As disabling all the extensions had not solved the issue before, I had an inkling that my settings were to blame for the lag. Thus, I began going through each setting and began uncommenting them, one by one, and checking to see if the lag had returned. Finally, I found that uncommenting the editor.smoothScrolling
setting reintroduced the bothersome lag. Hoping that that setting was the only one causing it, I uncommented all of the other settings and enabled all my extensions. To my surprise, the lag did not increase any further. Later on, I did a few checks and I can confirm that editor.smoothScrolling
is the setting to blame for this.
Why this happens, I do not know. I will be opening a new issue about it in the VS Code Github.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With