Function redo
pub fn redo(
doc: &mut AutoCommit,
scope: &Scope,
limit: usize,
restore: impl FnMut(&Version) -> Result<Option<Box<dyn Action>>, String>,
) -> Result<Vec<Version>, String>Expand description
Bring back the last limit undos of scope, as one new change: an
outside step through the action restore gives for it (its recorded
action, run again), any other by reverting the undo. A positive pending
marker keeps such a step undone until its restoration settles. Returns
the undo changes it brought back, newest first.
§Errors
Says why nothing was redone: no undo of the scope’s is in effect, a newer step of its own came after it, or a restoration cannot be applied.