editing UndoHistory

SyntaxEditor for WPF Forum

Posted 9 years ago by Samuel Amoser
Version: 10.2.0533
Avatar
Hi

I set up a
  ITextChange change = document.CreateTextChange(TextChangeTypes.ChangeCase);
to convert keywords of our language to upper case (instead of waiting for the CaseSensitivity.AutoCorrect to work). Unfortunately that ChangeCase will be found in the UndoHistory what doesn't make sense for me.

Is it somehow possible to remove an entry from the UndoHistory? Or at least to ignore it?

Thanks,
Samuel

Comments (5)

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

Sorry but you can't block entries in undo otherwise it would corrupt the history.

However the good news is that a maintenance release came out yesterday that fixes the auto character casing issue, if that's what you mean.


Actipro Software Support

Posted 9 years ago by Samuel Amoser
Avatar
Yes, corrupting the history, that's what I want to! ;-)
In fact, I want to correct the history. In my opinion the undo history should represent the user actions and not any programmatically edits. From that point of view, the "ChangeCase" corrupts the history.

Anyway - I don't know what the "auto character casing" should do, but it doesn't correct keywords: In the Sample Browsers SDI Code Editor I selected the VB language, because in it's langdef file it is declared as "CaseSensitivity="AutoCorrect"". When I type "public" it is wrongly recognized as a valid keyword. In my understanding, AutoCorrect should immediately change the typed "public" to "Public" (without an entry in the undo history).
Does this work on your system?

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

Unfortunately AutoCorrect is still on the TODO list. We have the option in there to support customers who convert languages from the WinForms version, which does have it. I've added this post to our TODO list item for AutoCorrect to let you know when it does get implemented.

Eventually it will do as you expected, which is convert "public" to "Public".


Actipro Software Support

Posted 9 years ago by Samuel Amoser
Avatar
Thank you,

Samuel.
Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Samuel,

Per this blog post, auto-case correct is coming in the next 2013.1 maintenance release:

http://blog.actiprosoftware.com/post.aspx?id=b8a854f0-3097-43ab-8cd1-a698a31ebe31


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.