Skip to main content

undo_step

Function undo_step 

pub fn undo_step(
    doc: &mut AutoCommit,
    step: &RunStep,
    by: Option<&str>,
    authors: &AuthorDirectory,
) -> StepOutcome
Expand description

Undo one application’s share of a run against the document that app owns.

The record’s own history does the undoing — revert_run over the step’s one change, the same revert revert_step writes for an app’s own Ctrl+Z — so a run undone from an agent’s report and the same work undone in the app land alike, with the same charge for what a later writer has since changed.

The transaction is left open; the owning app commits, so the undo lands under the person who asked for it and replicates like any other edit.