Skip to main content

Module document

Module document 

Source
Expand description

The document aggregate: the buffer plus its edit history and every derived view (selections, decorations, highlight cache, brackets, folds, find).

Document is the public choke point for changing text. Every edit goes through Document::edit/Document::edit_grouped, which run the transaction engine and record the inverse for undo — so a caller can never mutate the buffer behind history’s back. The one invariant this module rests on: every position-tracked derived fact rides a committed edit’s patch through the single mover rebase_views, on both the forward path and undo/redo, so no two copies of one position can drift apart.

Structs§

Document
A text document: buffer + undo history + selections + every derived view.

Enums§

RevealMode
How a reveal request should autoscroll the view to the newest caret.