Skip to content

Commit

Permalink
Merge pull request #399 from KrzysztofDusko/master
Browse files Browse the repository at this point in the history
Fix undo (Ctrl+Z) exception after not successful pasting
  • Loading branch information
maxkatz6 authored Feb 19, 2024
2 parents 9e0f46d + c390054 commit a484355
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/AvaloniaEdit/Editing/EditingCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,10 @@ private static async void OnPaste(object target, ExecutedRoutedEventArgs args)
}

if (text == null)
{
textArea.Document.EndUpdate();
return;
}


text = GetTextToPaste(text, textArea);
Expand Down

0 comments on commit a484355

Please sign in to comment.