Word wrap issues

SyntaxEditor for WPF Forum

Posted 8 months ago by Dirk Zellerfeld
Version: 19.1.0685
Platform: .NET 3.0 (Core)
Environment: Windows 10 (64-bit)
Avatar

Open the demo app and launch the full Syntax Editor, enable word wrap and paste this single line into the text area:

40 55 56 57 41 54 41 55 41 56 41 57 48 83 EC 60 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 4C 8B F2 4C 8B E9 48 89 54 24 28 45 33 FF 4C 39 79 20 0F 86 D8 00 00 00

You will notice that some lines have huge space area when they shouldn't. Screenshot: https://imgur.com/bdqUvCZ

Comments (1)

Posted 8 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Dirk,

We call into the WPF TextFormatter engine to format the lines and tell it the maximum view width.  Then it uses internal logic to find where breaks occur based on that maximum view width.  My guess is that its logic sees the "?" and thinks that's a punctuation associated with the "word" before it ("60"), so it tries to keep those together.  Thus the "60" moves to a new line even though since you're showing raw hex here, you'd rather it not do that.

Unfortunately there aren't any hooks that we know of in the WPF TextFormatter engine to alter word wrap behavior.


Actipro Software Support

The latest build of this product (v2020.1.1) was released 15 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.