in our code editor, when we are in debug mode, the whole editor is read-only,
but the user can enter in "edit mode" and can modify one line. When this line
has been edited, he can commit his changes or cancel them.
If he commits his changes, the whole document goes back to read-only, if he
cancels them, the line edited is restored.
To do this, I use a ReadOnlyIndicatorTagger and an EditIndicatorTagger with an
EditIndicatorTag retaining the text of the line when the user enters in
When he cancels the changes, I replace the range of the line with the text
contained in the EditIndicatorTag.
But there are several issues with this solution:
- when the changes are canceled, all the indicators of this line disappear
- all changes made during the "Edit mode", are kept in the Undo stack
What do you recommend to fix this ?