-
Notifications
You must be signed in to change notification settings - Fork 16
Maintanence: Rework undo/redo #3
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The Undo/Redo function is still experimental. It currently works as follows
- Capture the entire editor state before deletion
- On unde, rewind the editor state
This is resource-intensive and does not capture all cases in which undo should be possible. New approach
- Add UndoAction
- Each undoable action registers an UndoAction
- When undoing, the UndoActions are executed
Actions that should have an undo
- RemoveChar in normal mode
- DeleteSelection in visual mode
- After inserting in insert mode.
This is tricky, we need to keep track of what was added and what was removed. Maybe it is enough to save at which cursor position we started and what was added or deleted. - Paste
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request