Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-rw-r--r--helix-term/src/ui/editor.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 5d028415..6fecd512 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -24,14 +24,14 @@ use helix_core::{
};
use helix_view::{
annotations::diagnostics::DiagnosticFilter,
- document::{Mode, SavePoint, SCRATCH_BUFFER_NAME},
+ document::{Mode, SCRATCH_BUFFER_NAME},
editor::{CompleteAction, CursorShapeConfig},
graphics::{Color, CursorKind, Modifier, Rect, Style},
input::{KeyEvent, MouseButton, MouseEvent, MouseEventKind},
keyboard::{KeyCode, KeyModifiers},
Document, Editor, Theme, View,
};
-use std::{mem::take, num::NonZeroUsize, path::PathBuf, rc::Rc, sync::Arc};
+use std::{mem::take, num::NonZeroUsize, path::PathBuf, rc::Rc};
use tui::{buffer::Buffer as Surface, text::Span};
@@ -1049,12 +1049,11 @@ impl EditorView {
pub fn set_completion(
&mut self,
editor: &mut Editor,
- savepoint: Arc<SavePoint>,
items: Vec<CompletionItem>,
trigger_offset: usize,
size: Rect,
) -> Option<Rect> {
- let mut completion = Completion::new(editor, savepoint, items, trigger_offset);
+ let mut completion = Completion::new(editor, items, trigger_offset);
if completion.is_empty() {
// skip if we got no completion results
@@ -1073,6 +1072,8 @@ impl EditorView {
pub fn clear_completion(&mut self, editor: &mut Editor) -> Option<OnKeyCallback> {
self.completion = None;
let mut on_next_key: Option<OnKeyCallback> = None;
+ editor.handlers.completions.request_controller.restart();
+ editor.handlers.completions.active_completions.clear();
if let Some(last_completion) = editor.last_completion.take() {
match last_completion {
CompleteAction::Triggered => (),