Fixes #29774 When filtering the outline panel, matches with equal fuzzy scores previously defaulted to the last item due to iterator `max_by_key` semantics. This caused the bottommost match (e.g. `C::f`) to always be pre-selected regardless of cursor position. Changes: - Select the match nearest to the cursor when scores are tied, using a multi-criteria comparison: score -> cursor containment depth -> proximity to cursor -> earlier index - Move outline search off the UI thread (`smol::block_on` -> async `cx.spawn_in`) to avoid blocking during filtering - Wrap `Outline<Anchor>` in `Arc` for cheap cloning into the async task - Add `match_update_count` to discard results from stale queries Tests : Adds a regression test: `test_outline_filtered_selection_prefers_cursor_proximity_over_last_tie` which passes Video : [Screencast from 2026-03-03 17-01-32.webm](https://github.com/user-attachments/assets/7a27eaed-82a0-4990-85af-08c5a781f269) Release Notes: Fixed the outline filtering always select last match --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev>
1 file changedLine totals unavailable