From 8adc2814618d7400abd9d1d4e14235c4f7c6026c Mon Sep 17 00:00:00 2001 From: JJ Date: Tue, 31 Oct 2023 20:22:27 -0700 Subject: [PATCH] Write pre-manipulation pastes to the revision history --- helix-term/src/ui/editor.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 31195a4e557a6..e5d956dafdd39 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -1362,17 +1362,11 @@ impl Component for EditorView { // if the focused view still exists and wasn't closed if cx.editor.tree.contains(focus) { let config = cx.editor.config(); - let mode = cx.editor.mode(); let view = view_mut!(cx.editor, focus); let doc = doc_mut!(cx.editor, &view.doc); view.ensure_cursor_in_view(doc, config.scrolloff); - - // Store a history state if not in insert mode. This also takes care of - // committing changes when leaving insert mode. - if mode != Mode::Insert { - doc.append_changes_to_history(view); - } + doc.append_changes_to_history(view); } EventResult::Consumed(callback)