aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorMichael Davis2023-07-27 02:48:16 +0000
committerGitHub2023-07-27 02:48:16 +0000
commit6a431afc4e650efd2eca4afdf1122b3896e43ee3 (patch)
tree04413ec20185d1e6c3952cd0367547ce1f435cb5 /helix-term/src
parentdea6894f92b23d6c94196e590efa01c491b5d6b2 (diff)
Save an undo checkpoint before accepting completion (#7747)
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/ui/completion.rs2
1 files changed, 2 insertions, 0 deletions
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,