From ee9c53d2f9d1090724cd5181e08144137497b7d6 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Sun, 4 Dec 2022 21:46:11 -0600 Subject: [PATCH] Add CopyText in Explorer Result --- .../Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs index e9cbfc2bd..8a12f1306 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs @@ -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