Undo after inserting keys and pressing `<C-u>` is broken
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
In insert mode, when I type and then press Ctrl+u (to delete to beginning of line), then try to undo, it only moves my cursor without bringing back the deleted text.
To Reproduce
Steps to reproduce the behavior:
- Enter insert mode in the middle of a line
- Type some text
<C-u>- Exit insert mode
Press u
Expected behavior
Pre-existing text (prior to inserting characters) is brought back.
Actual behavior
Document not updated at all, only the cursor moves. I need to use VSCode undo to bring it back.
Screenshots

Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.14.5
- VSCode version: 1.46.0-insiders
- OS: OS X 10.15.4
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
Reproduce the issue in VSCodeVim using the listed insert-mode steps, then trace handling for typed keys, Ctrl+u, and the subsequent undo command. Done means pressing u restores the pre-existing text rather than only moving the cursor, with the reproduction confirmed on the affected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100