mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
A cancel cut the journal back to where the first canceled group began. That also removed the commands run in other documents after it began, which the cancel does not undo, so a replay of the journal lost them. Each undo group now keeps the numbers of its own journal entries: the commands that start and end in its document and the commands that edit it. A cancel removes only those entries, and the later entries are numbered down to close the gaps (`Journal::remove`). An entry of a canceled group that also switched to another document, such as a batch that draws and then activates another document, is replaced by a `document.activate` of that document, so the commands after it replay in the same document.