mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
add action keyword when changing qury
This commit is contained in:
@@ -58,7 +58,7 @@ namespace Wox.Plugin.Folder
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Result CreateFolderResult(string title, string path)
|
private Result CreateFolderResult(string title, string path, string queryActionKeyword)
|
||||||
{
|
{
|
||||||
return new Result
|
return new Result
|
||||||
{
|
{
|
||||||
@@ -82,7 +82,7 @@ namespace Wox.Plugin.Folder
|
|||||||
}
|
}
|
||||||
|
|
||||||
string changeTo = path.EndsWith("\\") ? path : path + "\\";
|
string changeTo = path.EndsWith("\\") ? path : path + "\\";
|
||||||
_context.API.ChangeQuery(changeTo);
|
_context.API.ChangeQuery(queryActionKeyword + " " + changeTo);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -93,7 +93,7 @@ namespace Wox.Plugin.Folder
|
|||||||
string search = query.Search.ToLower();
|
string search = query.Search.ToLower();
|
||||||
var userFolderLinks = _settings.FolderLinks.Where(
|
var userFolderLinks = _settings.FolderLinks.Where(
|
||||||
x => x.Nickname.StartsWith(search, StringComparison.OrdinalIgnoreCase));
|
x => x.Nickname.StartsWith(search, StringComparison.OrdinalIgnoreCase));
|
||||||
var results = userFolderLinks.Select(item => CreateFolderResult(item.Nickname, item.Path))
|
var results = userFolderLinks.Select(item => CreateFolderResult(item.Nickname, item.Path, query.ActionKeyword))
|
||||||
.ToList();
|
.ToList();
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
@@ -166,7 +166,7 @@ namespace Wox.Plugin.Folder
|
|||||||
|
|
||||||
var result =
|
var result =
|
||||||
fileSystemInfo is DirectoryInfo
|
fileSystemInfo is DirectoryInfo
|
||||||
? CreateFolderResult(fileSystemInfo.Name, fileSystemInfo.FullName)
|
? CreateFolderResult(fileSystemInfo.Name, fileSystemInfo.FullName, query.ActionKeyword)
|
||||||
: CreateFileResult(fileSystemInfo.FullName);
|
: CreateFileResult(fileSystemInfo.FullName);
|
||||||
results.Add(result);
|
results.Add(result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user