Skip to main content

Module undo

Module undo 

Source
Expand description

W3.3: Undo / redo stack with typing coalesce.

Per-editable component. Each UndoEntry is a structural delta - removed and inserted carry the bytes a single edit displaced. Pure-insert edits have empty removed; pure-delete edits have empty inserted; replace edits have both.

Coalescing: consecutive single-character insertions within UndoStack::group_window (default 500 ms) collapse into one entry so undo restores word-sized chunks, not character-sized ones (Qt’s QUndoStack::beginMacro analogue).

Structs§

UndoEntry
One reversible delta on a TextBuffer.
UndoStack
Per-editable undo stack (W3.3).

Enums§

UndoKind
What kind of delta one entry encodes.