file_finder: Remove common segments of long paths in search results (#25049)
This PR makes progress on #7711 by identifying any common prefix of the paths in the file finder's search results, and replacing the "interior" of that prefix---every path segment but the first and last---with `...`, when a heuristic indicates that the longest path would otherwise overflow the modal. The elision is not applied to any segment that contains a match for the search query. There may be more work to do on #7711 in the case of long result paths that do not share a significant common prefix. Release Notes: - Improved display of long paths in the file finder modal Co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
80458ffb96
commit
9ef0501853
49 changed files with 207 additions and 157 deletions
|
@ -476,7 +476,6 @@ impl InlineAssistant {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn suggest_assist(
|
||||
&mut self,
|
||||
editor: &Entity<Editor>,
|
||||
|
@ -1433,7 +1432,6 @@ struct InlineAssistScrollLock {
|
|||
}
|
||||
|
||||
impl EditorInlineAssists {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn new(editor: &Entity<Editor>, window: &mut Window, cx: &mut App) -> Self {
|
||||
let (highlight_updates_tx, mut highlight_updates_rx) = async_watch::channel(());
|
||||
Self {
|
||||
|
@ -1545,7 +1543,6 @@ pub struct InlineAssist {
|
|||
}
|
||||
|
||||
impl InlineAssist {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn new(
|
||||
assist_id: InlineAssistId,
|
||||
group_id: InlineAssistGroupId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue