Expand description
Damage + LineDelta — the typed dirty-region boundary.
The second node of escriba’s sealed refresh tree (theory/ESCRIBA.md §X),
below EditGen: where EditGen answers did anything
change?, Damage answers what region changed? so the renderer can scope
its work (re-shape / scissored present) to that region instead of the whole
document.
The invariant it seals (S3): Damage ⊇ the actually-changed region.
The type only ever widens (the join is a
join-semilattice with Full as top), so the producer can be conservative
and a consumer that repaints Damage never misses a changed cell. An
under-approximation — a changed line the renderer skips — has no
constructible path: there is no operation that narrows Damage.
Structs§
- Line
Delta - How the line count changed under one edit — the scope signal a buffer
mutation reports up to the refresh tree.
startis the first line the edit touched; the counts let a consumer tell an in-place edit (old == new, damage is local) from one that shifted every line below (old != new, damage runs to the end of the document).
Enums§
- Damage
- The dirty region of the document to refresh. A join-semilattice ordered
None ⊑ Lines ⊑ Viewport ⊑ Full, so combining two damages always yields one that covers both (never less). Line ranges are inclusive[from, to];to == u32::MAXmeans “to the end of the document” (used when an edit shifted every line below it).