From f992729147b2a415a82526d9479e9fb875c8aa61 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Fri, 19 May 2023 00:56:33 -0400 Subject: [PATCH] Provide CopyText field instead of empty string --- Flow.Launcher/MainWindow.xaml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 43bd9fd35..b334dd0fd 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -59,9 +59,11 @@ namespace Flow.Launcher private void OnCopy(object sender, ExecutedRoutedEventArgs e) { - if (QueryTextBox.SelectionLength == 0) + var result = _viewModel.Results.SelectedItem?.Result; + if (QueryTextBox.SelectionLength == 0 && result != null) { - _viewModel.ResultCopy(string.Empty); + string copyText = result.CopyText; + _viewModel.ResultCopy(copyText); } else if (!string.IsNullOrEmpty(QueryTextBox.Text))