mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-26 03:59:55 +00:00
Hide weak worktrees in the file finder
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
2fcf1aee6b
commit
64f5a45397
1 changed files with 6 additions and 2 deletions
|
@ -1324,9 +1324,13 @@ impl Project {
|
||||||
cancel_flag: &'a AtomicBool,
|
cancel_flag: &'a AtomicBool,
|
||||||
cx: &AppContext,
|
cx: &AppContext,
|
||||||
) -> impl 'a + Future<Output = Vec<PathMatch>> {
|
) -> impl 'a + Future<Output = Vec<PathMatch>> {
|
||||||
let include_root_name = self.worktrees.len() > 1;
|
let worktrees = self
|
||||||
let candidate_sets = self
|
|
||||||
.worktrees(cx)
|
.worktrees(cx)
|
||||||
|
.filter(|worktree| !worktree.read(cx).is_weak())
|
||||||
|
.collect::<Vec<_>>();
|
||||||
|
let include_root_name = worktrees.len() > 1;
|
||||||
|
let candidate_sets = worktrees
|
||||||
|
.into_iter()
|
||||||
.map(|worktree| CandidateSet {
|
.map(|worktree| CandidateSet {
|
||||||
snapshot: worktree.read(cx).snapshot(),
|
snapshot: worktree.read(cx).snapshot(),
|
||||||
include_ignored,
|
include_ignored,
|
||||||
|
|
Loading…
Reference in a new issue