Expand description
What the shell keeps about a document being edited: whether editing is on, what has changed since the file was read, and how to take it back.
Undo is a stack of snapshots of the content tree rather than a log of
commands. The tree derives Clone, a document of the size these
applications open clones in well under a millisecond, and commands would buy
redo granularity nobody has asked for. DESIGN.md §11.
Each snapshot also holds where the caret stood in that state, where the view has one, so that taking an edit back or putting it back shows the place it happened.
Structs§
- Editing
- The shell’s editing state, handed to the view on every frame.
Type Aliases§
- Caret
- Where a caret stood: a paragraph’s path under the root the view draws, and a character offset into its text.