WordWrapMode = Word, how to recognize the soft line break?

SyntaxEditor for WPF Forum

Posted 6 years ago by Christel
Version: 13.2.0161
Avatar

Hi,

I would like to use WordWrapMode = Word.

Actually, I don't use it as the formatting rule of a text in our syntaxeditor should be,

to insert a tab before the word in the new line after a line break (NewLine: \r\n)

This works perfect (using TextFormatter) now for NewLine inserted with Enter-Key.

 

When I now want to use WordWrapMode = Word, I assume, "soft line breaks" are inserted.

As well there should be a tab before the word in the new line after a soft line break.

How can I recognize a soft line break in the text I get from the snapshot?

I tried it already with defining a token "SoftLineBreak" with regexp "\r\r\n" but this seems not to work.

As you can insert WordWrapGlyphs, you must be able to recognize the soft line break.

How do you do that?

Could you help me?

 

Cheers

Christel

Comments (1)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Christel,

Sorry but we don't have any features to indent word-wrapped lines.  What happens in word wrap mode is that the view's text formatting engine is told it only has a certain width to work in.  Any text that doesn't fit within that space is wrapped to another view line.  Nothing is changed in the actual document's text to do this.  The view lines themselves (not document lines, which are different) track whether each view line is a wrapped line or not via the ITextViewLine.HasHardLineBreak property.  I looked at our code in this area for a while, but it doesn't look like there is any option or workaround to inject leading whitespace on wrapped lines at this time.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.