Skip to main content

Module undo

Module undo 

Source
Expand description

Per-buffer undo tree, persisted in undo_groups (and the edit log).

Branches form when the user undoes a group and then makes a different edit instead of redoing — the new edit becomes a sibling rather than overwriting the redo branch (per spec §8).

Thread ownership: only the caller-selected engine thread mutates an UndoTree; it lives inside crate::Buffer.

Structs§

EditRecord
One atomic edit recorded in an undo group, alongside the inverse op the undo path replays to revert it.
UndoGroup
A coalesced unit of undo (typing in a single 500ms run, one paste, one multi-cursor edit, one find-replace fanout, etc.).
UndoTree
The full per-buffer undo history.