mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02:00
[PT Run] Settings plugin: Settings path filter and bug fixes (#13151)
* Create filter method * adding call of new method * solve bug #13150 * fixes and comment updates * fix typos * Update filter method * Improve performance on empty queries * fix typos
This commit is contained in:
@@ -110,6 +110,12 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings
|
||||
|
||||
bool Predicate(WindowsSetting found)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(query.Search))
|
||||
{
|
||||
// If no search string is entered skip query comparison.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (found.Name.Contains(query.Search, StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
@@ -145,6 +151,12 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings
|
||||
}
|
||||
}
|
||||
|
||||
// Search by key char '>' for app name and settings path
|
||||
if (query.Search.Contains('>'))
|
||||
{
|
||||
return ResultHelper.FilterBySettingsPath(found, query.Search);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user