Posted 9 years ago by Matt Whitfield
Version: 4.0.0285
Avatar
Just a quick question

In syntax editor, when undoing a document modification that was caused by completion of the member list, the text range that was associated with the member list is highlighted - is there any way to change this behaviour?

I've tried to find reference to it in the documentation, but I can't find which document modification types cause this behaviour, and if there is any way to change it...

Thanks

Matt

Comments (3)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Matt,

Sorry but I don't believe there is any way for you to alter that behavior right now.


Actipro Software Support

Posted 9 years ago by Matt Whitfield
Avatar
Hello,

Thanks for the update. I have worked around it in a crude way by adding the following code in the handler for UndoRedoStateChanged on the document:
if (e.ChangeType == UndoRedoStateChangeType.Undo)
{
    if (e.Modification.Type == DocumentModificationType.AutoComplete)
    {
        if (shtb.SelectedView.Selection != null && shtb.SelectedView.Selection.TextRange.Length > 0)
        {
            shtb.SelectedView.Selection.StartOffset = shtb.SelectedView.Selection.TextRange.EndOffset;
        }
    }
}
Can you see any problem with that?

Thanks

Matt

[Modified at 10/05/2010 06:00 AM]
Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
That will probably work fine.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.