mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Trim query
This commit is contained in:
parent
6cbc9493c9
commit
4cab77a57d
1 changed files with 4 additions and 1 deletions
|
|
@ -55,11 +55,14 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
|
|||
|
||||
protected override List<Result> QueryInternal(Query query)
|
||||
{
|
||||
if (query.RawQuery.EndsWith(" ") || query.RawQuery.Length <= 1) return new List<Result>();
|
||||
string myQuery = query.RawQuery.Trim();
|
||||
|
||||
List<Result> results = new List<Result>();
|
||||
|
||||
foreach (var item in controlPanelItems)
|
||||
{
|
||||
if (item.LocalizedString.IndexOf(query.RawQuery, StringComparison.OrdinalIgnoreCase) >= 0 || item.InfoTip.IndexOf(query.RawQuery, StringComparison.OrdinalIgnoreCase) >= 0)
|
||||
if (item.LocalizedString.IndexOf(myQuery, StringComparison.OrdinalIgnoreCase) >= 0 || item.InfoTip.IndexOf(myQuery, StringComparison.OrdinalIgnoreCase) >= 0)
|
||||
{
|
||||
results.Add(new Result()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue