Expand description
Indentation guides — the per-pane layer both renderers paint from.
See docs/dev/architecture/indent-guides.md (design) and
docs/dev/operations/slice-plans/indent-guides.md (slices).
§What this is
IndentGuides is the resolved answer to “which columns carry a guide on
which rows, and which block is the cursor in”. It is built by
cells_worker in the pass that builds the pane’s
DisplayMatrix, from the same
snapshot and stamped with the same MatrixVersion — so the two cannot
disagree and guides need no staleness axis of their own.
§Why the paint predicate is resolved here
IndentBlock::paints_on decides whether a guide may occupy a column, and
getting it wrong means painting over text. Applying it in the producer
rather than in each renderer means there is exactly one implementation: a
bug surfaces as a failing test here rather than as corrupted text in one
peer and not the other. What each renderer still owns is the mechanism —
the TUI substitutes a glyph into a cell, the GPU peer paints a hairline
quad — because a terminal cell cannot hold a one-pixel rule.
§Why blocks are published alongside the per-row marks
The active guide is the innermost block containing the cursor, and the cursor moves at keystroke rate. Publishing extents rather than a precomputed “is active” flag lets each renderer pick the active block per frame from the cursor row it already holds — an integer scan over the blocks in the window — so cursor motion costs the worker nothing and the highlight has zero lag.
Structs§
- Guide
Mark - One guide occupying one column of one row.
- Indent
Guide Inputs - The per-buffer inputs a guide layer is built from, resolved once per
publish and carried on
crate::render_state::PaneCellsInputs. - Indent
Guides - The per-pane guide layer.
Functions§
- build_
indent_ guides - Build the guide layer for the source lines
[lo, hi). - indent_
axis_ version - Hash the inputs that change the guides’ geometry.