Skip to main content

undo_step

Function undo_step 

pub fn undo_step(
    doc: &mut AutoCommit,
    scope: &Scope,
    hash: &ChangeHash,
    compensate: impl FnMut(&Version) -> Result<Option<Box<dyn Action>>, String>,
    words: &dyn HistoryWords,
) -> Result<Vec<Version>, String>
Expand description

Take back the one step of scope’s in effect that the change hash is part of (with the rest of its gesture), wherever it stands in history, as one new change: a step a history list names. Returns the step’s changes, newest first.

§Errors

As undo, and when the change is no step of scope’s in effect.