Optionaltransactions: IStoreThe commit log is the stack; arbitrary operations cannot be added. Perform work through a described transaction instead.
Forget the current history: commits at-or-before this point stop being undoable. The commits themselves remain in the store.
Close the undo manager and remove the listener.
Returns true if there are undo actions on the stack.
Undo the last actions on the stack.
number of actions to undo, default is 1.
An UndoManager that is a view over the transaction store's commit log, not a mirror of it.
Remarks
The store already models undo: the chain behind the current commit is the undo stack, the segment from the current commit forward to the tip is the redo stack, and committing on a restored state prunes that forward branch (the redo-clearing rule). Deriving each answer from the log on demand means the stack can never lag the store — an
undo()issued in the same tick as an edit acts on the commit that edit just made. (The event-fed mirror this replaces registered operations fromonCommitEnd, which the store dispatches a tick late; an immediate undo raced it and silently acted on a stale stack.) It is also the shape that extends to collaboration: a per-author stack is a filter over the same log.Commits without a description are not offered as undo points (elided transactions); their changes revert alongside the nearest described commit.