VSCodeVim / VSCodeVim/Vim

Workaround "cursorMove" command bug in VSCode API until its fixed

Open
#4,250 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.
The L motion doesn't work correctly, but it's actually caused by a bug in VSCode API, sadly it seems like they don't plan to fix it anytime soon.

Describe the solution you'd like
We could make a workaround until they fix it. L should not scroll the viewPort, same as H and M don't.

Describe alternatives you've considered
I've tried patching it myself, it works correctly for movement (simply L), but fails at dL, cL, etc.

Additional context
The main problem is how in VSCode moving to the last visible line scrolls the viewPort so you always can see the line below. Also both Vim and NeoVim always renders full lines.

How pressing repeatedly H M L works right now:

A7gq4YCWvo

How pressing repeatedly H M L works after my patch (almost like Vim):

bOOStrc7tS

How my patch fails at dL (without my patch it doesn't work correctly either):

K4a1yr7Ox0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the VSCode API cursorMove handling for the H, M, and L motions, then compare the linked patch's behavior for plain L with dL and cL. The work is done when L no longer scrolls the viewport like H and M, while operator combinations behave correctly and match the described Vim and NeoVim rendering behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.