icsharpcode / AvalonEdit

The WPF-based text editor component used in SharpDevelop
http://avalonedit.net/
MIT License
1.85k stars 471 forks source link

Holding down Ctrl-X cuts 7 lines then freezes application for a few seconds #339

Open sleepp1 opened 2 years ago

sleepp1 commented 2 years ago

I noticed if I pressed Ctrl-X to cut a line and then held it down to continue cutting lines, the interface would freeze up for a few seconds after the 7th line. After it unfreezes, it'll delete another 1 line or 7 lines and then freeze again. This would continue to repeat. On one machine, it doesn't unfreeze unless I let go of the keys. In the debugger, I see these messages keep printing while the interface is frozen so maybe they're related. Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationCore.dll Exception thrown: 'System.NotImplementedException' in PresentationCore.dll

The build environment probably doesn't matter since I tried some other projects using AvalonEdit such as RoslynPad and the Edi sample projects as well as a new blank project in VS2019 targeting 4.7.2 and the latest AvalonEdit with only added to the MainWindow XAML. The same behavior occurred in all of them for me and occurs on both Window 10 and 11. In case this is an issue with the clipboard locking/synchronizing, I am doing this over remote desktop with the clipboard monitoring enabled. The freezing doesn't occur if is use Ctrl-D to delete lines.

The expected behavior would be to continue deleting lines without freezing the application.