From 6a431afc4e650efd2eca4afdf1122b3896e43ee3 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Wed, 26 Jul 2023 21:48:16 -0500 Subject: Save an undo checkpoint before accepting completion (#7747) --- helix-term/src/ui/completion.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'helix-term/src/ui') diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs index 1ebcd192..c7f9250d 100644 --- a/helix-term/src/ui/completion.rs +++ b/helix-term/src/ui/completion.rs @@ -292,6 +292,8 @@ impl Completion { }; // if more text was entered, remove it doc.restore(view, &savepoint, true); + // save an undo checkpoint before the completion + doc.append_changes_to_history(view); let transaction = item_to_transaction( doc, view.id, -- cgit v1.2.3-70-g09d2