`:normal` incorrectly executes motion commands
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
The :normal command is incorrectly executing motion commands (i.e. h, l, j, k). It moves the cursor to the correct place, but only for a fraction of a second, after which the cursor returns to its former location.
To Reproduce
Steps to reproduce the behavior:
- Open any file with the Vim extension enabled
- Enter the command
:normal G(or any other motion command) - See incorrect behavior
Expected behavior
Executing commands such as these should move the cursor to the correct position and leave it there. For instance, :normal G should move the cursor to the beginning of the last line in the file, or :normal 3j should move the cursor 3 lines down. This behavior is seen in the command-line NeoVim.
Screenshots

:normal G failing

:normal j failing

:normal jdd kind of working
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.24.2
- VSCode version: 1.73.0
- OS: Windows 11
Additional context
It can be seen that it does execute the command; only the cursor movement fails. In the third GIF I show that :normal jdd properly deletes the line 1 below the cursor, but it once again returns the cursor to its starting position.
It should be noted that I have NeoVim enabled.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing :normal G, :normal j, and :normal jdd in the VSCode Vim extension, then compare their cursor behavior with command-line NeoVim. Trace the :normal command and motion-command handling to find why cursor movement is reverted; done means motions leave the cursor at the expected position while compound commands still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- neovim, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100