Use caret position for inserted text

This commit is contained in:
Garulf 2024-02-04 14:33:00 -05:00
parent 7ada82afd1
commit e9dba45f82

View file

@ -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;
}
}