Dirty flag not removed when undoing changes.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
When using VS Code with the Vim extension, I notice that:
In Vim: If you make changes to a file and then undo those changes using the u key, Vim recognizes that the buffer content matches the original file on disk. As a result, it clears the modified flag (+ in the filename) and doesn't prompt you to save upon exit.
In VS Code with Vim Extension: After making changes and undoing them with u, VS Code still marks the file as modified (indicated by a dot ● in the file tab or a dirty indicator), even though the file content matches the saved version. This means VS Code prompts you to save the file upon closing, even when no actual changes exist.
Vim's behaviour is really helpful when having changed a file accidentally, as it shows when being back to the original state by removing the dirty flag.
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
No source file or test is named. First reproduce the issue in VS Code with the Vim extension by editing a file and undoing with the u key, then trace the extension's undo and dirty-state handling. Done means returning to the saved content clears the dirty indicator and avoids an unnecessary save prompt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100