pub struct Overlay {
pub selection: Vec<SelectionSpan>,
pub matches: Vec<SelectionSpan>,
pub markers: Vec<MarkerPosition>,
pub active_match: Vec<SelectionSpan>,
}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 search highlights projected onto visible rows. Search matches
are consumer-owned (next/prev navigation holds the Vec<Match>), so the
consumer hands the highlight 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.
active_match: Vec<SelectionSpan>The active (current) search match’s spans (#428, v12): the member of
matches the consumer designated via set_active_search_highlight
(which match is active is consumer policy — next/prev navigation).
Projected by the same mechanism as matches, and also present there —
the renderer’s highlight ranking resolves the overlap (#424), not
exclusion here. Empty when nothing is designated.