Iron out some edge-cases

This commit is contained in:
Conrad Irwin 2023-09-20 16:30:45 -06:00
parent 2d9db0fed1
commit a25fcfdfa7
5 changed files with 24 additions and 21 deletions

View file

@ -702,6 +702,9 @@ impl BufferSearchBar {
.searchable_items_with_matches
.get(&searchable_item.downgrade())
{
if matches.len() == 0 {
return;
}
let new_match_index = matches.len() - 1;
searchable_item.update_matches(matches, cx);
searchable_item.activate_match(new_match_index, matches, cx);