pub enum VirtualRowKind {
Generic,
DeletionBlock,
Filler,
Sticky,
Annotation,
BrandingBlock,
MediaBlock,
}Expand description
D.6.i (2026-05-31): which kind of virtual row this is, for renderer-side backdrop / decoration discrimination.
Two production kinds today:
DeletionBlock— a diff deletion-block row (D.3 inline overlay) carrying baseline content that’s gone from the current side. Painted with thehost_theme.diff_deletion_block_bgbackdrop (default: faint dark red) so the user sees “this content existed in baseline but is gone in current”.Filler— a blank padding row (D.4.c / D.6.b side-by-side alignment) on the shorter side of a hunk so parallel rows line up across panes. Should paint with no backdrop (or a neutral one) — fillers are visual padding, not content; the deletion-block red would mis-read them as “deleted lines.”
Generic is the default for any other virtual-row
source (future code-lens, inlay-line, multibuffer
excerpt header). Renderers treat it like a deletion
block for backdrop purposes today; the variant exists
so future kinds can join the discriminator without a
breaking change.
Variants§
Generic
Default — any virtual row not explicitly tagged. Painted with the deletion-block backdrop today.
DeletionBlock
Diff deletion-block row (D.3). Baseline content that was removed from the current side; paints with the deletion-block backdrop.
Filler
Side-by-side alignment filler (D.4.c / D.6.b). Blank padding; no backdrop.
Sticky
Sticky header row — always rendered at the top of the pane
regardless of scroll position. Excluded from the per-line
virtual_rows_at pass so it is never double-painted when its
anchor line is in the viewport. Use VirtualRow::bg to supply
a background colour; falls back to no backdrop if bg is None.
Annotation
MG.26b: an annotation row — content that scrolls with its anchor and paints no backdrop of its own.
Distinct from Generic, which carries the
diff deletion-block backdrop: a blame chunk heading painted
with that would read as a removed line. Distinct from
Filler, which is blank alignment padding
rather than something to read, and from
Sticky, which pins to the top of the pane —
an annotation belongs with the lines it describes and has to
scroll away with them. VirtualRow::bg still supplies a
background where one is wanted.
BrandingBlock
Dashboard branding block (DB.4-gpui). A contiguous group of these rows carries the mark’s block cells + the wordmark/tagline text; the GPUI peer intercepts the group and paints a 2-D composition instead of the flat cells — the mark as crisp square quads (corner cuts preserved) and the “Lattice” wordmark shaped large, vertically centred beside the mark. The TUI peer paints the cells normally (its terminal-art treatment). A paint discriminant only — never a motion/scroll/cursor branch.
MediaBlock
IM.3: an inline media block — an image drawn where it appears in the
buffer. A contiguous group of these rows carries the alt text as
ordinary cells; the GPUI peer intercepts the group and paints the
image over the region, the TUI peer paints the cells it was given
and needs no code of its own. The BrandingBlock treatment exactly,
which is what keeps the TUI a first-class peer for a feature it
cannot render.
Scrolls with its anchor (an image belongs with the line that
references it), so unlike BrandingBlock it is NOT pinned. A paint
discriminant plus a height contribution — never a motion or cursor
branch.
Implementations§
Source§impl VirtualRowKind
impl VirtualRowKind
Sourcepub fn is_pinned(self) -> bool
pub fn is_pinned(self) -> bool
Whether rows of this kind are pinned to the top of the pane (rendered in the sticky pre-pass, excluded from the scrolling per-line pass, and reserved out of the visible window) rather than scrolling with the document.
Sticky is the general headerline (multibuffer excerpt headers,
async-status HUD). BrandingBlock — the dashboard logo — is pinned
too: it is a masthead that should stay put while the sections
beneath it scroll, and it keeps its 2-D paint treatment either way.
Trait Implementations§
Source§impl Clone for VirtualRowKind
impl Clone for VirtualRowKind
Source§fn clone(&self) -> VirtualRowKind
fn clone(&self) -> VirtualRowKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more