diff --git a/src/modules/launcher/Plugins/Wox.Plugin.Folder/Main.cs b/src/modules/launcher/Plugins/Wox.Plugin.Folder/Main.cs index 12296056f8..b53db2aa41 100644 --- a/src/modules/launcher/Plugins/Wox.Plugin.Folder/Main.cs +++ b/src/modules/launcher/Plugins/Wox.Plugin.Folder/Main.cs @@ -94,29 +94,8 @@ namespace Wox.Plugin.Folder Title = title, IcoPath = path, SubTitle = subtitle, + QueryTextDisplay = path, TitleHighlightData = StringMatcher.FuzzySearch(query.Search, title).MatchData, - Action = c => - { - if (c.SpecialKeyState.CtrlPressed) - { - try - { - Process.Start(_fileExplorerProgramName, path); - return true; - } - catch (Exception ex) - { - MessageBox.Show(ex.Message, "Could not start " + path); - return false; - } - } - - string changeTo = path.EndsWith("\\") ? path : path + "\\"; - changeTo = string.IsNullOrEmpty(query.ActionKeyword) ? changeTo : query.ActionKeyword + " " + changeTo; - bool requery = true; - _context.API.ChangeQuery(changeTo, requery); - return false; - }, ContextData = new SearchResult { Type = ResultType.Folder, FullPath = path } }; } diff --git a/src/modules/launcher/Wox.Plugin/Result.cs b/src/modules/launcher/Wox.Plugin/Result.cs index 7631655015..d1f49b142e 100644 --- a/src/modules/launcher/Wox.Plugin/Result.cs +++ b/src/modules/launcher/Wox.Plugin/Result.cs @@ -18,6 +18,11 @@ namespace Wox.Plugin public string FontFamily { get; set; } + /// + /// The text that will get displayed in the Search text box, when this item is selected in the result list. + /// + public string QueryTextDisplay { get; set; } + public string IcoPath { get { return _icoPath; } diff --git a/src/modules/launcher/Wox/ViewModel/ResultViewModel.cs b/src/modules/launcher/Wox/ViewModel/ResultViewModel.cs index cab7fec113..9127850371 100644 --- a/src/modules/launcher/Wox/ViewModel/ResultViewModel.cs +++ b/src/modules/launcher/Wox/ViewModel/ResultViewModel.cs @@ -255,7 +255,8 @@ namespace Wox.ViewModel public override string ToString() { - return Result.Title.ToString(); + var display = String.IsNullOrEmpty(Result.QueryTextDisplay) ? Result.Title : Result.QueryTextDisplay; + return display; } } }