From f4edff71fecf35a1dd8edad455ef6873882fb353 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Fri, 3 Dec 2021 05:44:33 -0500 Subject: [PATCH] Add field for tab complete --- Flow.Launcher.Plugin/Result.cs | 11 +++++++++++ Flow.Launcher/ViewModel/MainViewModel.cs | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index 833ada9cd..deb225100 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -13,6 +13,8 @@ namespace Flow.Launcher.Plugin private string _icoPath; + private string _insertText; + /// /// Provides the title of the result. This is always required. /// @@ -29,6 +31,15 @@ namespace Flow.Launcher.Plugin /// public string ActionKeywordAssigned { get; set; } + public string InsertText + { + get { return string.IsNullOrEmpty(_insertText) ? Title : _insertText; } + set + { + _insertText = value; + } + } + public string IcoPath { get { return _icoPath; } diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 73a0820ac..dc9fd5dd1 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -240,7 +240,7 @@ namespace Flow.Launcher.ViewModel var result = results.SelectedItem?.Result; if (result != null) // SelectedItem returns null if selection is empty. { - ChangeQueryText(result.Title); + ChangeQueryText(result.InsertText); } });