Skip to main content

VirtualRowKind

Enum VirtualRowKind 

Source
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 the host_theme.diff_deletion_block_bg backdrop (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

Source

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

Source§

fn clone(&self) -> VirtualRowKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for VirtualRowKind

Source§

impl Debug for VirtualRowKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VirtualRowKind

Source§

fn default() -> VirtualRowKind

Returns the “default value” for a type. Read more
Source§

impl Eq for VirtualRowKind

Source§

impl Hash for VirtualRowKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for VirtualRowKind

Source§

fn eq(&self, other: &VirtualRowKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for VirtualRowKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more