forked from mawww/kakoune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
From the issue: > It often happens to me that I carefully craft a selection with multiple > cursors, ready to make changes elegantly, only to completely mess it > up by pressing a wrong key (by merging the cursors for example). Being > able to undo the last selection change (even if only until the previous > buffer change) would make this much less painful. Fix this by always keeping the last few selections in memory and allowing simple linear undo/redo of selections. The perliminary key bindings are <c-h> and <c-k>. I find them more convenient to type than any of X Y <backspace> <minus>. When a sequence of n selection-undo-operations is followed by another selection change, we drop the redo information of the n selections that were undone. This reduces noise in the undo history, because it only drops selections that have already been undone. Currently there's no special interaction with undo of buffer changes; the two histories are completely independent. It's possible to restore selections that predate a buffer modification. (When trying to apply an old buffer's selection to the new buffer, Kakoune computes a diff of the buffers and updates the selection accordingly. This works quite well for simple examples.) In future we might want to synchronize buffer/selection undo histories so we can implement Sublime Text's "Soft undo" feature. Closes mawww#898
- Loading branch information
Showing
4 changed files
with
135 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters