tab_switcher: Select first buffer in the list when a query is enabled (#58424)

…tered (#58420)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #58420

Release Notes:
- Reset `selected_index` to 0 whenever the query goes from empty to
non-empty, ensuring the first (best) fuzzy match is always highlighted
when the user starts typing.
- This is handled in `update_matches()` and `update_all_pane_matches()`
by checking whether the query is empty before applying the reset.
03d4536836Roméo Maignal committed on 6/4/2026, 3:05:21 AM· committed by GitHubparentf70edaf
1 file changedLine totals unavailable