fix(desktop-entries): Multi-word query support
This commit is contained in:
parent
5b15e92bcb
commit
a378194f57
1 changed files with 1 additions and 1 deletions
|
|
@ -218,7 +218,7 @@ impl<W: AsyncWrite + Unpin> App<W> {
|
|||
for search_interest in items.drain(..) {
|
||||
let search_interest = search_interest.to_ascii_lowercase();
|
||||
let append = search_interest.starts_with(&*query)
|
||||
|| search_interest.contains(&*query)
|
||||
|| query.split_ascii_whitespace().any(|query| search_interest.contains(&*query))
|
||||
|| strsim::damerau_levenshtein(&*query, &*search_interest) < 3;
|
||||
|
||||
if append {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue