VSCodeVim / VSCodeVim/Vim

`:q!` (or `ZQ`) on same file split wipes changes

Open
#3,892 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
When I split a file with unsaved changes, and close one of the splits, the changes are wiped, without possibility of recover. This is not how vim originally behaves, lost some work.

To Reproduce

  1. Open a file.
  2. Write anything.
  3. Split the file with :split.
  4. Close the new split with :q! or ZQ.
  5. See lost changes.

Expected behavior
As in the original vim, the split is expected to be closed, and unsaved changes should be preserved in the remaining window.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.8.2
  • VSCode version: 1.36.1
  • OS: Linux Mint 19

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 by following the listed :split, edit, and :q!/ZQ steps, then inspect the handling of split closure and unsaved buffers. Done means closing one split preserves the unsaved changes in the remaining window, as in Vim.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vim, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.