mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 05:00:16 +00:00
Simplify file finder update_matches logic
This commit is contained in:
parent
75b8f7425d
commit
eec8a3b555
1 changed files with 3 additions and 3 deletions
|
@ -422,13 +422,13 @@ impl FileFinder {
|
|||
) {
|
||||
if search_id >= self.latest_search_id {
|
||||
self.latest_search_id = search_id;
|
||||
if did_cancel && self.latest_search_did_cancel && query == self.latest_search_query {
|
||||
if self.latest_search_did_cancel && query == self.latest_search_query {
|
||||
util::extend_sorted(&mut self.matches, matches.into_iter(), 100, |a, b| b.cmp(a));
|
||||
} else {
|
||||
self.matches = matches;
|
||||
self.latest_search_did_cancel = did_cancel;
|
||||
self.latest_search_query = query;
|
||||
}
|
||||
self.latest_search_query = query;
|
||||
self.latest_search_did_cancel = did_cancel;
|
||||
self.include_root_name = include_root_name;
|
||||
self.list_state.scroll_to(self.selected_index());
|
||||
ctx.notify();
|
||||
|
|
Loading…
Reference in a new issue