Bookmarking on empty lines

SyntaxEditor for WPF Forum

Posted 3 years ago by Martin de Jong - Statistics Netherlands
Version: 16.1.0631
Avatar

Hi

 

On empty lines toggling a bookmark does not seem to work... or is it me? :)

 

Greetz Martin

[Modified 3 years ago]

Comments (3)

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

Hi Martin,

Thanks for reporting this.  We found the bug and have fixed it for the next maintenance release.


Actipro Software Support

Posted 3 years ago by Martin de Jong - Statistics Netherlands
Avatar

Maybe look into the TextDocumentChanged event too? It looks like deleting an empty line or a space on an almost empty line gives inaccurate results in the EditorSnapshotChangedEventArgs value (maybe one position off)?

( i am testing if the change has a newline '\r' inside. If then i save the bookmarks. )

Example: When i mark a line completely ( with only spaces ) and i deleted the selected line, the arguments EditorSnapshotChangedEventArgs don't contain a cr but do contain spaces. The line is removed.

[Modified 3 years ago]

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

Hi Martin,

Sorry but we're not seeing anything wrong when we look.  Can you please give us details for an exact scenario in one of our samples that tells what you are doing and what you see in an event handler that looks wrong?

Note that we don't track CR (\r) characters internally.  We convert all line ends to LF (\n) only.  Then various methods can push back out CRLF when you get the snapshot.Text or snapshot.GetSubstring(textRange, LineTerminator.CarriageReturnNewline).


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.