diff options
author | Blaž Hrastnik | 2020-10-23 02:37:32 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-12-03 04:10:35 +0000 |
commit | e4070d4de0883c3fc979b3d57b1b43ecb0a0d72f (patch) | |
tree | 96b93b8471f59716a14c3ca1a74c9c5c20a97372 /helix-view/src | |
parent | efc5aa2016e56e0721d125a20e3573d25af4dd76 (diff) |
Bump document version on undo/redo.
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/commands.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/helix-view/src/commands.rs b/helix-view/src/commands.rs index 06c4b9e0..768a717e 100644 --- a/helix-view/src/commands.rs +++ b/helix-view/src/commands.rs @@ -504,6 +504,7 @@ pub fn insert_char_prompt(prompt: &mut Prompt, c: char) { pub fn undo(view: &mut View, _count: usize) { if let Some(revert) = view.doc.history.undo() { + view.doc.version += 1; view.doc.apply(&revert); } @@ -512,6 +513,7 @@ pub fn undo(view: &mut View, _count: usize) { pub fn redo(view: &mut View, _count: usize) { if let Some(transaction) = view.doc.history.redo() { + view.doc.version += 1; view.doc.apply(&transaction); } } |