mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
A document opened or created between edit.undoGroup.begin and edit.undoGroup.end opens an undo group of its own with the begun group's name, so an atomic command_batch that starts with file.new or document.open is one undo step in the new document. The group opens after the command that opens the document: when that command also edits it (a command.batch), those edits stay the command's own undo step, and a canceled group keeps them, so the journal still replays. Both commands also run with no document open, and a command.batch that fails rolls back a begun group. Switching to a document that was already open does not open a group in it.