From 5a733d05dbc4c85dfe27ca152f06da496cd6910d Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Wed, 1 Dec 2021 04:20:54 -0500 Subject: [PATCH] Initial Tab complete --- Flow.Launcher/MainWindow.xaml | 2 +- Flow.Launcher/ViewModel/MainViewModel.cs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index dd8979650..31f2c528c 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -41,7 +41,7 @@ - + + { + var results = SelectedResults; + + if (index != null) + { + results.SelectedIndex = int.Parse(index.ToString()); + } + + var result = results.SelectedItem?.Result; + if (result != null) // SelectedItem returns null if selection is empty. + { + ChangeQueryText(result.Title, true); + } + }); + LoadContextMenuCommand = new RelayCommand(_ => { if (SelectedIsFromQueryResults()) @@ -383,6 +399,7 @@ namespace Flow.Launcher.ViewModel public ICommand OpenSettingCommand { get; set; } public ICommand ReloadPluginDataCommand { get; set; } public ICommand ClearQueryCommand { get; private set; } + public ICommand ReplaceQueryWithResult { get; set; } public string OpenResultCommandModifiers { get; private set; }