Pick the highest rating from matching with the app name and exec in the applications plugin
This commit is contained in:
@@ -37,6 +37,7 @@ pub fn get_matches(input: RString, entries: &mut Vec<(DesktopEntry, u64)>) -> RV
|
|||||||
.filter_map(|(entry, id)| {
|
.filter_map(|(entry, id)| {
|
||||||
matcher
|
matcher
|
||||||
.fuzzy_match(&entry.name, &input)
|
.fuzzy_match(&entry.name, &input)
|
||||||
|
.max(matcher.fuzzy_match(&entry.exec, &input))
|
||||||
.map(|val| (entry, id, val))
|
.map(|val| (entry, id, val))
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
Reference in New Issue
Block a user