Skip to main content

Module virtual_rows

Module virtual_rows 

Source
Expand description

Virtual rows: a sibling lane to crate::CellMatrix for rows that displace content vertically without belonging to the source rope.

Examples of virtual rows: diff deletion blocks (D.3), multibuffer excerpt headers and separators (M.2), LSP inlay hints that occupy a row of their own, code-lens summaries above a function declaration. Each is a row of Cells that appears at a specific anchor source line, either immediately above or below that line.

D.0a (this module) ships the primitive’s data layer + an interleaving crate::DisplaySliceIter over [CellMatrix]. The first production consumer is D.3 (inline diff overlay) per docs/dev/architecture/diff-system.md; the multibuffer consumer is M.2 per multibuffer-views.md. D.0a itself has no production renderer caller – the iterator is validated end-to-end by tests + bench against real [CellMatrix] inputs.

Design anchor: docs/dev/architecture/virtual-rows.md.

Structs§

ScaleRun
F.3 (Thread F): one contiguous run of display columns rendered at a single font scale, produced by coalesce_scales. The renderer shapes each run at font_size × scale/100.
VirtualRow
One virtual row’s anchor + content.
VirtualRowMatrix
The published virtual-row lane for one document.
VirtualRowVersion
A monotonically-increasing counter; bumped by the publisher whenever the VirtualRowMatrix is replaced.

Enums§

AnchorPosition
Where a virtual row sits relative to its anchor source line.
VirtualRowKind
D.6.i (2026-05-31): which kind of virtual row this is, for renderer-side backdrop / decoration discrimination.

Constants§

BASE_SCALE
Base font scale in hundredths (100 = 1.0×). A column with this scale (or no scale entry) renders at the base font size.

Traits§

VirtualRowProvider
A producer of virtual rows.

Functions§

coalesce_scales
F.3 (Thread F): coalesce a per-column scales slice into contiguous same-scale ScaleRuns across total_cols columns, exactly as a renderer coalesces per-cell fg into text runs.

Type Aliases§

ProviderId
Stable identity for a VirtualRowProvider. Issued by the worker / subsystem that owns the provider registry.