Filter and sort suggestions in autocomplete
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
bcbd265de9
commit
b89a39bcb3
11 changed files with 258 additions and 171 deletions
|
@ -181,6 +181,10 @@ pub async fn match_strings(
|
|||
cancel_flag: &AtomicBool,
|
||||
background: Arc<executor::Background>,
|
||||
) -> Vec<StringMatch> {
|
||||
if candidates.is_empty() {
|
||||
return Default::default();
|
||||
}
|
||||
|
||||
let lowercase_query = query.to_lowercase().chars().collect::<Vec<_>>();
|
||||
let query = query.chars().collect::<Vec<_>>();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue