Avoid leaving selected item index past end of matches list

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
Julia 2023-10-10 09:27:18 -04:00
parent 354882f2c0
commit f5af5f7334

View file

@ -1332,6 +1332,7 @@ impl CompletionsMenu {
}
self.matches = matches.into();
self.selected_item = 0;
}
}