From 59b020ec91592f94647a8bab8a583c2418480d96 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Wed, 20 Nov 2024 16:02:10 -0600 Subject: [PATCH] Save an undo checkpoint before paste in insert mode (#8121) --- 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 ee2949fa0..073413989 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -4339,6 +4339,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