emux_render/cursor.rs
1//! Cursor rendering (block, beam, underline styles).
2
3use crossterm::cursor::SetCursorStyle;
4use emux_term::CursorShape;
5
6/// Map a terminal cursor shape to the corresponding crossterm cursor style.
7pub fn cursor_style(shape: CursorShape) -> SetCursorStyle {
8 match shape {
9 CursorShape::Block => SetCursorStyle::SteadyBlock,
10 CursorShape::Underline => SetCursorStyle::SteadyUnderScore,
11 CursorShape::Bar => SetCursorStyle::SteadyBar,
12 }
13}