summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCossonLeo2021-10-26 00:42:37 +0000
committerGitHub2021-10-26 00:42:37 +0000
commitf331ba9df4d7d22a5e9599737da581feb630f748 (patch)
treed76e061a24e4bbb7c203d5a09edad246aaf440a5
parentb142fd4080d99a7e4f39bb06207ded6771d47b20 (diff)
Clear competion items when start_offset > cursor (#906)
-rw-r--r--helix-term/src/ui/completion.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs
index 44879fcf..a893e70b 100644
--- a/helix-term/src/ui/completion.rs
+++ b/helix-term/src/ui/completion.rs
@@ -199,7 +199,7 @@ impl Completion {
.selection(view.id)
.primary()
.cursor(doc.text().slice(..));
- if self.start_offset <= cursor {
+ if self.trigger_offset <= cursor {
let fragment = doc.text().slice(self.start_offset..cursor);
let text = Cow::from(fragment);
// TODO: logic is same as ui/picker