From 12eec890240a05d1e090114f7f4fdd7c1ee8ff88 Mon Sep 17 00:00:00 2001 From: JJ Date: Wed, 1 May 2024 14:15:18 -0700 Subject: [PATCH] Fix writes from insert mode not properly updating the revision history ref: https://github.com/helix-editor/helix/issues/3501 ref: https://github.com/helix-editor/helix/issues/6513 ref: https://github.com/helix-editor/helix/pull/7226 --- 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 45fdcde0..294433b5 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -903,6 +903,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 });