Fix a completions panic when no fuzzy matches + inline completion (#23019)
My mistake in #22977, in the case where the inline completion was not selected it set the index to 1 assuming there would be following match entries.
This commit is contained in:
parent
5785266c8c
commit
61115bd047
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue