mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Handle clipboard paste event if text
This commit is contained in:
parent
2107402ba8
commit
db6e54160f
1 changed files with 9 additions and 0 deletions
|
|
@ -71,6 +71,15 @@ namespace Flow.Launcher
|
|||
App.API.CopyToClipboard(QueryTextBox.SelectedText, showDefaultNotification: false);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPaste(object sender, ExecutedRoutedEventArgs e)
|
||||
{
|
||||
if (System.Windows.Clipboard.ContainsText())
|
||||
{
|
||||
_viewModel.QueryText = System.Windows.Clipboard.GetText().Replace("\n", String.Empty).Replace("\r", String.Empty);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnClosing(object sender, CancelEventArgs e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue