From 1657aec66339383dc5b588be6754391be2377926 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Wed, 30 Aug 2023 16:03:55 -0500 Subject: [PATCH] Save an undo checkpoint before paste in insert mode --- helix-term/src/commands.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 31ea75814..4bc5e1358 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -3948,6 +3948,10 @@ fn paste_impl( return; } + if mode == Mode::Insert { + doc.append_changes_to_history(view); + } + let repeat = std::iter::repeat( // `values` is asserted to have at least one entry above. values