Ladies and Gents,
my code has an action that executes a Document.insertString inside a runWriteAction.
Furthermore, it uses executeCommand to declare an undoableActionPerformed for undoing/redoing the insert.
Both the insert and undo/redo work like a charm.
The unfortunate part of the process is that any changes made before the insert cannot be undone.
I get the "Cannot Undo" message box, that stops me in my tracks.
How is it possible to get around that?