From 0201ef920516db0fd4a4e6939f87bd0d7e4cf5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Tue, 8 Jun 2021 01:38:57 +0900 Subject: [PATCH] ui: completion: Use the correct type_name Fixes #166 --- helix-term/src/commands.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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::()) + .unwrap(); if let Some(ui) = ui.as_any_mut().downcast_mut::() { ui.set_completion(items, offset_encoding, trigger_offset, size); };