Skip to content

Commit ee9c53d

Browse files
committed
Add CopyText in Explorer Result
1 parent c56a275 commit ee9c53d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ internal static Result CreateFolderResult(string title, string subtitle, string
5858
SubTitle = Path.GetDirectoryName(path),
5959
AutoCompleteText = GetPathWithActionKeyword(path, ResultType.Folder),
6060
TitleHighlightData = StringMatcher.FuzzySearch(query.Search, title).MatchData,
61+
CopyText = path,
6162
Action = c =>
6263
{
6364
if (c.SpecialKeyState.CtrlPressed || (!Settings.PathSearchKeywordEnabled && !Settings.SearchActionKeywordEnabled))
@@ -174,7 +175,7 @@ internal static Result CreateOpenCurrentFolderResult(string path, bool windowsIn
174175
}, StringSplitOptions.None).Last();
175176

176177
var title = $"Open {folderName}";
177-
178+
178179
var subtitleFolderName = folderName;
179180

180181
// ie. max characters can be displayed without subtitle cutting off: "Program Files (x86)"
@@ -189,6 +190,7 @@ internal static Result CreateOpenCurrentFolderResult(string path, bool windowsIn
189190
AutoCompleteText = GetPathWithActionKeyword(path, ResultType.Folder),
190191
IcoPath = path,
191192
Score = 500,
193+
CopyText = path,
192194
Action = _ =>
193195
{
194196
Context.API.OpenDirectory(path);
@@ -213,6 +215,7 @@ internal static Result CreateFileResult(string filePath, Query query, int score
213215
AutoCompleteText = GetPathWithActionKeyword(filePath, ResultType.File),
214216
TitleHighlightData = StringMatcher.FuzzySearch(query.Search, Path.GetFileName(filePath)).MatchData,
215217
Score = score,
218+
CopyText = filePath,
216219
Action = c =>
217220
{
218221
try

0 commit comments

Comments
 (0)