Minor Issue with Selection after Undo Operation

SyntaxEditor for Windows Forms Forum

Posted 19 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
Avatar
I've noticed a few situations where the selection state of SyntaxEditor is not maintained when you perform an undo operation.

1) Open Sample Application with C# Sample
2) With the caret at offset 0 and no text selected, press the 'Delete' key to delete the first '/' in the document. Now press Ctrl+Z to undo the delete. The '/' character is restored, but SyntaxEditor has selected that text. I would expect the caret to be back at offset 0 with a selection length of 0.
3) Now highlight the word 'Hover' in line 1 starting from the 'r' and selecting to the 'H' (i.e. StartOffset = 7, EndOffset = 3). The caret should be at offset 3 with all of 'Hover' selected. Now press the delete key and then Ctrl+Z to undo the delete. The text and selection are restored, but the caret has now moved offset 7.

Is it possible to update the 'Undo' functionality to restore the selection state before the operation was performed?

Comments (2)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'll have to add that to the TODO list since undo isn't currently tracking that sort of information.


Actipro Software Support

Posted 19 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
Avatar
Thanks :)
The latest build of this product (v24.1.0) 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.