VSCodeVim / VSCodeVim/Vim

Undo after inserting keys and pressing `<C-u>` is broken

Open
#4,913 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/undo kind/bug
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:

  1. Enter insert mode in the middle of a line
  2. Type some text
  3. <C-u>
  4. Exit insert mode
  5. 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
Kapture 2020-05-28 at 23 07 09

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.