Skip to main content

Module cursor_shape

Module cursor_shape 

Source
Expand description

Vim-style cursor shape derived from ModalState.

Phase 5.8.N: hoisted out of both renderer peers. Pre-5.8.N the TUI peer had lattice-ui-tui::runtime::cursor_style_for(modal) -> SetCursorStyle and the GPUI peer had lattice-ui-gpui::window::CursorShape::for_mode(modal) -> Self. Both implemented the same vim convention:

  • Normal / Visual / Operator-Pending → Block
  • Insert / Command / Search → Bar
  • Replace → Underline

Now lives once here; renderer peers map CursorShape → their native cursor primitive (crossterm SetCursorStyle for TUI; div-border style for GPUI). Renderer-neutral so any future peer (web, headless) reuses the mapping.

Enums§

CursorShape
Vim-style cursor shape, renderer-neutral. Each renderer peer translates this to its own primitive at paint time.

Functions§

minibuffer_owns_caret
Does a minibuffer own the caret in this modal state?