on master help sign in
create savepoint before requesting completion
4300a3aPascal Kuthe
helix-term/src/commands.rs+1
@@ -4181,6 +4181,7 @@ pub fn completion(cx: &mut Context) {
4181 iter.reverse();
4181 iter.reverse();
4182 let offset = iter.take_while(|ch| chars::char_is_word(*ch)).count();
4182 let offset = iter.take_while(|ch| chars::char_is_word(*ch)).count();
4183 let start_offset = cursor.saturating_sub(offset);
4183 let start_offset = cursor.saturating_sub(offset);
4184+ doc.savepoint();
4184
4185
4185 cx.callback(
4186 cx.callback(
4186 future,
4187 future,
helix-term/src/ui/editor.rs−3
@@ -957,9 +957,6 @@ impl EditorView {
957 return;
957 return;
958 }
958 }
959
959
960− // Immediately initialize a savepoint
961− doc_mut!(editor).savepoint();
962−
963 editor.last_completion = None;
960 editor.last_completion = None;
964 self.last_insert.1.push(InsertEvent::TriggerCompletion);
961 self.last_insert.1.push(InsertEvent::TriggerCompletion);
965
962