From 3b2691b8246f2abc4732bc32d1d6c1ddc9c5ee66 Mon Sep 17 00:00:00 2001 From: JJ Date: Sat, 24 Feb 2024 20:00:39 -0800 Subject: [PATCH] Fix writes from insert mode not properly updating the revision history --- helix-term/src/ui/editor.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 15a7262a8b07..ad8a400c5a27 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -834,6 +834,10 @@ impl EditorView { cxt.editor.autoinfo = self.keymaps.sticky().map(|node| node.infobox()); let mut execute_command = |command: &commands::MappableCommand| { + let doc = doc_mut!(cxt.editor); + let view = view_mut!(cxt.editor); + doc.append_changes_to_history(view); + command.execute(cxt); helix_event::dispatch(PostCommand { command, cx: cxt });