aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-06-07 16:38:57 +0000
committerBlaž Hrastnik2021-06-07 16:38:57 +0000
commit0201ef920516db0fd4a4e6939f87bd0d7e4cf5dd (patch)
tree2c06173e18773bf8becc5b87eefbbf2d25eb17c9 /helix-term/src
parent037f45f24e8efdc4a5fd3836d9db1c6170301306 (diff)
ui: completion: Use the correct type_name
Fixes #166
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 00556e18..0c33241f 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -2252,7 +2252,9 @@ pub fn completion(cx: &mut Context) {
}
use crate::compositor::AnyComponent;
let size = compositor.size();
- let ui = compositor.find("hx::ui::editor::EditorView").unwrap();
+ let ui = compositor
+ .find(std::any::type_name::<ui::EditorView>())
+ .unwrap();
if let Some(ui) = ui.as_any_mut().downcast_mut::<ui::EditorView>() {
ui.set_completion(items, offset_encoding, trigger_offset, size);
};