Skip to main content

Module undo

Module undo 

Source
Expand description

Undo stack.

Phase 0 ships a linear undo stack: each entry is the inverse of one applied edit (or one batch of edits applied as a single command). The branching undo tree per §5.1 is a later refinement; the linear stack is forward compatible because branching is built by retaining alternative redo paths when a new edit is applied while redo entries exist.

Structs§

UndoEntry
One entry on the undo stack: an ordered list of edits whose application inverts the user-visible operation. Storing a list (not a single Edit) lets a batch of edits applied atomically be undone atomically.
UndoStack
A linear undo / redo stack of UndoEntrys.