Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Oct 8, 2024
1 parent 8fe4b5d commit f0c7f2f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions JL.Windows/GUI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,11 @@ protected override async void OnSourceInitialized(EventArgs e)

private async Task<bool> 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)
{
Expand Down

0 comments on commit f0c7f2f

Please sign in to comment.