diff options
author | Blaž Hrastnik | 2021-10-16 09:43:07 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-10-16 09:43:07 +0000 |
commit | 2c0468ffd16de1f835ac9c4e39692a682273fb7b (patch) | |
tree | aafbc12fa7d5e1b577d582ddf5457226b413cd6c /helix-term/src/ui/completion.rs | |
parent | be428a295a0884ed0523a8a995e913ee1c863b60 (diff) |
fix: If backspacing past the start offset, cancel completion
Refs #822
Diffstat (limited to 'helix-term/src/ui/completion.rs')
-rw-r--r-- | helix-term/src/ui/completion.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs index ba009c50..c75b24f1 100644 --- a/helix-term/src/ui/completion.rs +++ b/helix-term/src/ui/completion.rs @@ -215,6 +215,10 @@ impl Completion { let text = Cow::from(fragment); // TODO: logic is same as ui/picker menu.score(&text); + } else { + // we backspaced before the start offset, clear the menu + // this will cause the editor to remove the completion popup + menu.clear(); } } |