ZIm/crates/file_finder/src
Cole Miller aba89ba12a
Shorten overflowing paths in file finder (#25303)
Closes #7711

This PR changes the file finder to shorten the path portion of each
match by replacing a segment with `...`, if it would otherwise overflow
horizontally. Details:

- The overflow calculation is based on a crude linear width estimate for
ASCII text at the current em width. No elision is done for non-ASCII
paths.
- A path component will not be elided if it contains a matching position
for the file finder's search, or if it's the first or last component.
- Elision is only applied when it is successful in shortening the path
enough to not overflow.

Release Notes:

- Improved the appearance of the file finder when long paths are shown
by eliding path segments
2025-02-21 17:04:44 -05:00
..
file_finder.rs Shorten overflowing paths in file finder (#25303) 2025-02-21 17:04:44 -05:00
file_finder_settings.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
file_finder_tests.rs Shorten overflowing paths in file finder (#25303) 2025-02-21 17:04:44 -05:00
new_path_prompt.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
open_path_prompt.rs collab: Fix project sharing between Windows and Unix (#23680) 2025-02-10 16:12:01 -08:00