mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 08:02:24 +00:00
Merge branch 'fix/sidebar-search-branch' into integration/polish
This commit is contained in:
+15
-1
@@ -82,7 +82,21 @@ impl Tty7App {
|
||||
s.tabs
|
||||
.iter()
|
||||
.map(|&i| (i, self.tab_label(&self.tabs[i], i, Some(window), cx)))
|
||||
.filter(|(_, label)| query.is_empty() || label.to_lowercase().contains(&query))
|
||||
// The row shows a truncated title and a branch; the filter
|
||||
// only ever read the truncated title, so typing the branch
|
||||
// you can see, or the part of the path the row elided,
|
||||
// matched nothing.
|
||||
.filter(|(i, label)| {
|
||||
query.is_empty()
|
||||
|| label.to_lowercase().contains(&query)
|
||||
|| self.tabs[*i]
|
||||
.leaf_title(Some(window), cx)
|
||||
.to_lowercase()
|
||||
.contains(&query)
|
||||
|| self.tabs[*i]
|
||||
.git_status(Some(window), cx)
|
||||
.is_some_and(|g| g.branch.to_lowercase().contains(&query))
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
.collect();
|
||||
|
||||
Reference in New Issue
Block a user