From e9dba45f82e795691bc24e1b6b1f0a943a3b2625 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sun, 4 Feb 2024 14:33:00 -0500 Subject: [PATCH] Use caret position for inserted text --- Flow.Launcher/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index e61b32a94..36d852a26 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -77,7 +77,7 @@ namespace Flow.Launcher if (System.Windows.Clipboard.ContainsText()) { var clipboardText = System.Windows.Clipboard.GetText().Replace("\r\n", " "); - QueryTextBox.SelectedText = clipboardText; + _viewModel.ChangeQueryText(QueryTextBox.Text.Insert(QueryTextBox.CaretIndex, clipboardText)); e.Handled = true; } }