Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix a completions panic when no fuzzy matches + inline completion (#23019)
Michael Sloan61115bd04792
diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rsindex 5fce4cbb1bb..2e3963f85f6 100644--- a/crates/editor/src/code_context_menus.rs+++ b/crates/editor/src/code_context_menus.rs@@ -773,7 +773,7 @@ impl CompletionsMenu {let mut entries = self.entries.borrow_mut();if let Some(CompletionEntry::InlineCompletionHint(_)) = entries.first() {entries.truncate(1);- if inline_completion_was_selected {+ if inline_completion_was_selected || matches.is_empty() {self.selected_item = 0;} else {self.selected_item = 1;