ZIm/crates/file_finder
Smit Barmase b2904e5d9f
file_finder: Prioritize file name matches over path matches (#27937)
Closes https://github.com/zed-industries/zed/issues/27936

Adds additional comparison after the existing history-based comparison.

This comparison checks whether the first position matched via fuzzy
search is in the file name. If so, we prioritize this match over one in
the path. If both items match either the file name or the path, the
existing comparison logic is used.

- [x] Tests

Before:
<img width="580" alt="image"
src="https://github.com/user-attachments/assets/011fdd01-3dfa-4950-abb1-dfda10885664"
/>

After:
<img width="614" alt="image"
src="https://github.com/user-attachments/assets/9c4944b0-83dc-4611-94bb-aae1758fab23"
/>


Release Notes:

- Fixed an issue where fuzzy matching in file finder did not properly
prioritize matches in file names.
2025-04-02 22:36:46 +05:30
..
src file_finder: Prioritize file name matches over path matches (#27937) 2025-04-02 22:36:46 +05:30
Cargo.toml chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00