diff --git a/src/tui/mode/overlay/completion_dropdown.zig b/src/tui/mode/overlay/completion_dropdown.zig index 0d8ed11..1fbeab5 100644 --- a/src/tui/mode/overlay/completion_dropdown.zig +++ b/src/tui/mode/overlay/completion_dropdown.zig @@ -356,6 +356,11 @@ const cmds = struct { const Result = command.Result; pub fn update_completion(self: *Type, _: Ctx) Result { + if (self.value.editor.completions.data.items.len == 0) { + tp.self_pid().send(.{ "cmd", "palette_menu_cancel" }) catch |e| self.logger.err(module_name, e); + return; + } + clear_entries(self); _ = try load_entries(self); }