Skip to content

Commit

Permalink
Save an undo checkpoint before accepting completion (helix-editor#7747)
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis authored and Schuyler Mortimer committed Jul 10, 2024
1 parent 1082c62 commit e3fa251
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helix-term/src/ui/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e3fa251

Please sign in to comment.