EditorView.TrimTrailingWhitespace() issue

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by Marianne
Version: 4.0.0250
Platform: Services
Environment: Windows XP (32-bit)
Avatar
According to documentation, TrimTrailingWhitespace() will trim the lines that are currently selected, or if there is no text selection, it will trim the entire document. If there is no text selection and the cursor is on line 20, then calling this function will only trim line 20. I would expect that the entire document be trimmed in this case. Thanks.

------------------------------- Marianne

Comments (3)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Marianne,

Actually I think the docs say the "current document line", not "current document". So it should be behaving as designed.


Actipro Software Support

Posted 12 years ago by Marianne
Avatar
You're right, my bad! That being the case can you add an overload to TrimTrailingWhitespace() that will accept a TextRange so that every line in the range will get trimmed? That way, if there is no selection I can choose what exactly will get trimmed? Thanks.

------------------------------- Marianne

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ok, this is done for the upcoming release:
Added a Document.TrimTrailingWhitespace method overload that accepts a TextRange.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.