mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-29 21:07:24 -06:00
The undo step was pushed before the command ran, so a command that changed nothing still added a step, marked the document edited, forced a relayout and threw the redo stack away. Five hundred of them filled the whole undo stack and pushed the user's own edits out of it, so they could never be undone again. The document, the selection, the formatting waiting at the caret and the column selection are now compared with what they were before the command ran. When nothing changed, the step is put back, the redo stack survives, and the document is not marked edited.