From e4070d4de0883c3fc979b3d57b1b43ecb0a0d72f Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 23 Oct 2020 11:37:32 +0900 Subject: Bump document version on undo/redo. --- helix-view/src/commands.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'helix-view/src') 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); } } -- cgit v1.2.3-70-g09d2