How to let IntelliJ IDEA's Local History ignore Plugins' temporary change and restore to document?

I am writing a IntelliJ IDEA plugin at here like AceJump, which is used for fast move caret in IDE.
like following, by apply TextAttributes to all 'i' occurrences, and give each 'i' an index char.
enter image description here

after user press 'H', the caret will move to 'i' in the "private". then change all Markup chars to original 'i'
PROBLEMS

  1. This action will change the Document contents during jump. so there will be a history change like below. Is there a way to ignore the changes in Local History management?

  2. After press Cmd-z, there is a dialog says "Cannot Undo". how to avoid this?

enter image description here


enter image description here


Thanks
2 comments

No, it is not possible to ignore changes.
You may try surrounding your document modifications into one CommandProcessor.executeCommand action or force them merged using the same groupId parameter.

0

In case someone google and find here. following is my final solution.
I using Swing graphics drawing to show the markers, works great.
please refer for details:https://github.com/whunmr/letsedit/blob/master/src/org/hunmr/acejump/MarkupPanel.java

0

Please sign in to leave a comment.