Provide CopyText field instead of empty string

This commit is contained in:
Garulf 2023-05-19 00:56:33 -04:00
parent f019bb2284
commit f992729147

View file

@ -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))