In my case it was the Format On Save
in settings that caused the undo/redo buffer to be flushed when saving files in VSC.
To get around this you can set Format On Save Mode
to
modifications
(requires source control like git)
or
modificationsIfAvailable
(this also requires source control to help with this issue else VSC will format the entire file and flush the undo/redo buffer)
Voila!!! I had both Format On Save
enabled and a redo buffer that was working after saving the file. Truly wonderful!
If this doesn´t help make sure to try to disable all extensions to see if one of them might be causing the buffer flushing.
