Reputation: 1587
If I'm making some files changes then close it and then reopen it, I will be able to undo those changes. How can I disable this behaviour that only changes made in the current open session can be reverted?
PS: this behaviour was not present for older versions of VS code.
Upvotes: 10
Views: 1965
Reputation: 2211
We can achieve this using the following steps:
You can follow the screenshot:
Upvotes: 1
Reputation: 480
Upvotes: -1
Reputation: 180611
See v1.45 Release Notes:
Disable persistent Undo
Last milestone, changed the Undo/Redo stack to be persisted when you close a file and reopen it. Not everyone wanted this new feature, so there is now a setting,
files.restoreUndoStack
, to disable persistent Undo.
[Additional info: see v1.46 release notes - you can undo even in files that were closed and remain closed.]
Upvotes: 15