aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 97078794..c3afbd92 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -1691,8 +1691,12 @@ pub fn completion(cx: &mut Context) {
// TODO: if no completion, show some message or something
if !items.is_empty() {
- let completion = Completion::new(items, trigger_offset);
- compositor.push(Box::new(completion));
+ use crate::compositor::AnyComponent;
+ let size = compositor.size();
+ let ui = compositor.find("hx::ui::editor::EditorView").unwrap();
+ if let Some(ui) = ui.as_any_mut().downcast_mut::<ui::EditorView>() {
+ ui.set_completion(items, trigger_offset, size);
+ };
}
},
);