icsharpcode / AvalonEdit

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

Line always wraps at 9600 #368

Closed jimfoye closed 2 years ago

jimfoye commented 2 years ago

I'm looking for some insight into this behavior. If I have a line that exceeds 9600 characters, the editor will always wrap it, regardless of the WordWrap property. I looked around the code, but I can't figure out where and why this limitation exists. Can someone help?

jimfoye commented 2 years ago

I figured out that TextLine, which is created by WPF, always comes back with a max length of 9600. Turns out a TextBox always wraps at 9600. There have been a couple of questions on SO about how to get around this, but no answers. I looked at the WPF source but couldn't come figure out why the limitation or where it's being implemented.

jimfoye commented 2 years ago

Closing, since it appears to be a WPF limitation.