Skip to content

Commit

Permalink
completion: Save sooner
Browse files Browse the repository at this point in the history
Testing a fix for archseer
  • Loading branch information
the-mikedavis committed Sep 9, 2022
1 parent 907f32e commit e362a8e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3850,6 +3850,7 @@ pub fn completion(cx: &mut Context) {
let offset = iter.take_while(|ch| chars::char_is_word(*ch)).count();
let start_offset = cursor.saturating_sub(offset);
let prefix = text.slice(start_offset..cursor).to_string();
doc.savepoint();

cx.callback(
future,
Expand Down
3 changes: 0 additions & 3 deletions helix-term/src/ui/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1067,9 +1067,6 @@ impl EditorView {
return;
}

// Immediately initialize a savepoint
doc_mut!(editor).savepoint();

editor.last_completion = None;
self.last_insert.1.push(InsertEvent::TriggerCompletion);

Expand Down

0 comments on commit e362a8e

Please sign in to comment.