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.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 43b1e7a0..b1bb02c7 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -1097,10 +1097,15 @@ impl EditorView {
}
pub fn handle_idle_timeout(&mut self, cx: &mut commands::Context) -> EventResult {
- if self.completion.is_some()
- || cx.editor.mode != Mode::Insert
- || !cx.editor.config().auto_completion
- {
+ if let Some(completion) = &mut self.completion {
+ return if completion.ensure_item_resolved(cx) {
+ EventResult::Consumed(None)
+ } else {
+ EventResult::Ignored(None)
+ };
+ }
+
+ if cx.editor.mode != Mode::Insert || !cx.editor.config().auto_completion {
return EventResult::Ignored(None);
}