project_search: Fix message displayed when no results are found (#19108)
when no result found, always display `Search all files`, which is confused. Release Notes: - Fixed an issue where the project search would sometimes show "Search all files" when there were no results. --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
parent
e3c6ba4bd7
commit
695176898e
1 changed files with 3 additions and 1 deletions
|
@ -289,7 +289,6 @@ impl ProjectSearch {
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
this.update(&mut cx, |this, cx| {
|
this.update(&mut cx, |this, cx| {
|
||||||
this.no_results = Some(false);
|
|
||||||
this.match_ranges.extend(match_ranges);
|
this.match_ranges.extend(match_ranges);
|
||||||
cx.notify();
|
cx.notify();
|
||||||
})
|
})
|
||||||
|
@ -297,6 +296,9 @@ impl ProjectSearch {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.update(&mut cx, |this, cx| {
|
this.update(&mut cx, |this, cx| {
|
||||||
|
if !this.match_ranges.is_empty() {
|
||||||
|
this.no_results = Some(false);
|
||||||
|
}
|
||||||
this.limit_reached = limit_reached;
|
this.limit_reached = limit_reached;
|
||||||
this.pending_search.take();
|
this.pending_search.take();
|
||||||
cx.notify();
|
cx.notify();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue