Skip to main content

STEP_UNDO

Constant STEP_UNDO 

Source
pub const STEP_UNDO: StepId;
Expand description

The steps of an undo and a redo (ADR 0011): a before-hook may veto one (a gesture in progress) or redirect it (another scope), a run-hook does it instead of the owner, an after-hook follows. Their arguments: label (what it takes back, as the menu said), origin and scope (the history focus picked). Their result: {"undone": label, "scope", "steps", "rev", "head"} ("redone"), the label null when there was nothing. Besides the step’s own signal, the journal says edit.undone / edit.redone with the label, or edit.undo_failed / edit.redo_failed with the error or the veto; and history.changed or history.refused.