Have program with TRichView.
On some events program saves (to stream) text automatically but I'm loosing undo after that.
How to prevent it ? Want undo after save.
Undo becomes disabled if you call DeleteUnusedStyles or ClearUndo methods (what's why RichViewActions call DeleteUnusedStyles after loading/creating a document, not on saving)
My program saves data when main window became inactive and using DeleteUnusedStyles (RVActions used too).
And when I came back to program undo became disabled
Unfortunately, it's unavoidable in the current version, if you use DeleteUnusedStyles. This method deletes all styles which do not present in the document, but some deleted fragment in undo buffer may require them. What's why the undo buffer is cleared.