`:q!` (or `ZQ`) on same file split wipes changes
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
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
- Open a file.
- Write anything.
- Split the file with :split.
- Close the new split with :q! or ZQ.
- 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
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 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