aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-rw-r--r--helix-term/src/ui/editor.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 0840749f..dd6fff08 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -1073,6 +1073,7 @@ impl EditorView {
let editor = &mut cxt.editor;
if let Some((pos, view_id)) = pos_and_view(editor, row, column, true) {
+ let prev_view_id = view!(editor).id;
let doc = doc_mut!(editor, &view!(editor, view_id).doc);
if modifiers == KeyModifiers::ALT {
@@ -1082,6 +1083,10 @@ impl EditorView {
doc.set_selection(view_id, Selection::point(pos));
}
+ if view_id != prev_view_id {
+ self.clear_completion(editor);
+ }
+
editor.focus(view_id);
editor.ensure_cursor_in_view(view_id);