VSCodeVim / VSCodeVim/Vim

Bad undo behavior on join

Open
#3,024 0 comments 3 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

Unable to undo correctly after join

Steps to reproduce the behavior:

write two lines:

first
second

When cursor is on first line, use 'J' to join the lines, press 'U' to undo (both commands capital letters).

Expected: 'U' should make no change.

first second

Result:

firstsecond
  • Extension (VsCodeVim) version: v0.16.2
  • VSCode version: 1.26.1
  • OS: Windows, Linux

History becomes corrupt, using 'u' twice after 'U' will not help, there's data loss.

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 VSCode using the reported two-line example and the J, U, and u commands. Start by tracing the undo handling for join operations; done means pressing U after J leaves the joined line unchanged and subsequent undo history does not lose data.

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
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.