pub struct Overlay {
pub selection: Vec<SelectionSpan>,
pub matches: Vec<SelectionSpan>,
pub markers: Vec<MarkerPosition>,
pub marker_lines: Vec<MarkerLine>,
}Expand description
Interaction overlays projected onto the viewport (#108): highlight spans the
engine carries on the frame so a frame-mode consumer can paint them without
an in-process model query. Positions only — highlight colour is the
consumer’s (theme-agnostic). Coordinates are viewport rows/cols, re-projected
by frame() against the scroll offset so the engine stays the single
anchoring authority.
Fields§
§selection: Vec<SelectionSpan>The live selection projected onto visible rows (selection_range).
matches: Vec<SelectionSpan>The active search highlights projected onto visible rows. Search matches
are consumer-owned (next/prev navigation holds the Vec<Match>), so the
consumer hands the active set back via set_search_highlights and the
engine projects it here — mirroring how the engine-owned selection rides.
markers: Vec<MarkerPosition>Engine-owned markers visible in this viewport (#118): persistent line anchors for decorations. Unlike the selection (cleared on a screen swap) and search highlights (invalidated on output), markers re-anchor through buffer mutation and survive an alt-screen excursion; only their viewport position rides here.
marker_lines: Vec<MarkerLine>Every live marker’s absolute buffer line (#120 S3, v11), on-screen or not —
the overview ruler needs off-viewport anchors, which markers (viewport-
only) can’t supply. A superset of markers by id; different frame of
reference (absolute line, not viewport row).