Restored unsaved buffer is erased by Undo #21846
Labels
serialization
Restoration of the editor state after a restart
workspace
Feedback for workspace management, layout, interactions, etc
Check for existing issues
Describe the bug / provide steps to reproduce it
#13546 added the functionality of restoring unsaved buffers on restart.
Undo history is lost, which is expected. However, if you press Undo, the entire buffer is erased.
This is a bit of a footgun, as it is easy to accidentally erase the entire buffer and then overwrite the redo (e.g. by typing any character).
The more correct behaviour is for Undo to be a no-op in this situation, which is what VS Code does.
This would be fixed by #15097.
Environment
Zed: v0.164.2 (Zed)
OS: macOS 15.1.1
Memory: 16 GiB
Architecture: x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
No response
The text was updated successfully, but these errors were encountered: