aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJJ2024-05-01 21:15:18 +0000
committerJJ2024-05-01 23:54:41 +0000
commitcd2202fd54e5458371f8f15c149686f6c0933a9e (patch)
tree45d8aca2623cede3004748dedbdc0998b0e0c84e
parent3ecf200b3469f63016b27141c20286a36d5dd9eb (diff)
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
-rw-r--r--helix-term/src/ui/editor.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 7d28b62c..f761a546 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -850,6 +850,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 });