Add CopyText in Explorer Result

This commit is contained in:
Hongtao Zhang 2022-12-04 21:46:11 -06:00
parent c56a2751a9
commit ee9c53d2f9
No known key found for this signature in database
GPG key ID: 75F655B91C7AC9BB

View file

@ -58,6 +58,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
SubTitle = Path.GetDirectoryName(path),
AutoCompleteText = GetPathWithActionKeyword(path, ResultType.Folder),
TitleHighlightData = StringMatcher.FuzzySearch(query.Search, title).MatchData,
CopyText = path,
Action = c =>
{
if (c.SpecialKeyState.CtrlPressed || (!Settings.PathSearchKeywordEnabled && !Settings.SearchActionKeywordEnabled))
@ -174,7 +175,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
}, StringSplitOptions.None).Last();
var title = $"Open {folderName}";
var subtitleFolderName = folderName;
// ie. max characters can be displayed without subtitle cutting off: "Program Files (x86)"
@ -189,6 +190,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
AutoCompleteText = GetPathWithActionKeyword(path, ResultType.Folder),
IcoPath = path,
Score = 500,
CopyText = path,
Action = _ =>
{
Context.API.OpenDirectory(path);
@ -213,6 +215,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
AutoCompleteText = GetPathWithActionKeyword(filePath, ResultType.File),
TitleHighlightData = StringMatcher.FuzzySearch(query.Search, Path.GetFileName(filePath)).MatchData,
Score = score,
CopyText = filePath,
Action = c =>
{
try