diff --git a/JL.Windows/GUI/MainWindow.xaml.cs b/JL.Windows/GUI/MainWindow.xaml.cs index 3e4c788b..640b7755 100644 --- a/JL.Windows/GUI/MainWindow.xaml.cs +++ b/JL.Windows/GUI/MainWindow.xaml.cs @@ -124,15 +124,11 @@ protected override async void OnSourceInitialized(EventArgs e) private async Task CopyFromClipboard() { - bool gotTextFromClipboard = false; - while (Clipboard.ContainsText() && !gotTextFromClipboard) + while (Clipboard.ContainsText()) { try { - string text = Clipboard.GetText(); - gotTextFromClipboard = true; - - return CopyText(text); + return CopyText(Clipboard.GetText()); } catch (ExternalException ex) {