project search: Fix filtering when buffers are open (#16997)
This fixes a little bug that has snuck in #16923 Release Notes: - N/A
This commit is contained in:
parent
a5b82b2bf3
commit
4e67d33d88
1 changed files with 20 additions and 21 deletions
|
@ -471,17 +471,6 @@ impl WorktreeStore {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if open_entries.contains(&entry.id) {
|
|
||||||
let (mut tx, rx) = oneshot::channel();
|
|
||||||
tx.send(ProjectPath {
|
|
||||||
worktree_id: snapshot.id(),
|
|
||||||
path: entry.path.clone(),
|
|
||||||
})
|
|
||||||
.await?;
|
|
||||||
output_tx.send(rx).await?;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if query.filters_path() {
|
if query.filters_path() {
|
||||||
let matched_path = if include_root {
|
let matched_path = if include_root {
|
||||||
let mut full_path = PathBuf::from(snapshot.root_name());
|
let mut full_path = PathBuf::from(snapshot.root_name());
|
||||||
|
@ -495,8 +484,15 @@ impl WorktreeStore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let (tx, rx) = oneshot::channel();
|
let (mut tx, rx) = oneshot::channel();
|
||||||
output_tx.send(rx).await?;
|
|
||||||
|
if open_entries.contains(&entry.id) {
|
||||||
|
tx.send(ProjectPath {
|
||||||
|
worktree_id: snapshot.id(),
|
||||||
|
path: entry.path.clone(),
|
||||||
|
})
|
||||||
|
.await?;
|
||||||
|
} else {
|
||||||
filter_tx
|
filter_tx
|
||||||
.send(MatchingEntry {
|
.send(MatchingEntry {
|
||||||
respond: tx,
|
respond: tx,
|
||||||
|
@ -508,6 +504,9 @@ impl WorktreeStore {
|
||||||
})
|
})
|
||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output_tx.send(rx).await?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue