pub struct CursorDisplay {
pub position: usize,
pub anchor: usize,
pub visible: bool,
pub selected_cells: Vec<(usize, usize, usize)>,
}Expand description
Cursor display state for rendering.
The adapter reads cursor position from text-document’s TextCursor
and creates this struct to feed to crate::Typesetter::set_cursor.
text-typeset uses it to generate caret and selection decorations
in the next crate::Typesetter::render call.
Fields§
§position: usizeCursor position (character offset in the document).
anchor: usizeSelection anchor. Equals position when there is no selection.
When different from position, the range [min(anchor, position), max(anchor, position))
is highlighted as a selection.
visible: boolWhether the caret is visible (false during the blink-off phase). The adapter manages the blink timer; text-typeset just respects this flag.
selected_cells: Vec<(usize, usize, usize)>When non-empty, render cell-level selection highlights instead of
text-level selection. Each tuple is (table_id, row, col) identifying
a selected cell. The adapter fills this from TextCursor::selected_cells().