@@ -3,9 +3,10 @@ use crate::{
33 buffer::Cell,
44 layout::Rect,
55 style::{Color, Modifier},
6+ terminal::CursorKind,
67};
78use crossterm::{
8− cursor::{Hide, MoveTo, Show},
9+ cursor::{CursorShape, Hide, MoveTo, SetCursorShape, Show},
910 execute, queue,
1011 style::{
1112 Attribute as CAttribute, Color as CColor, Print, SetAttribute, SetBackgroundColor,
@@ -93,8 +94,14 @@ where
9394 map_error(execute!(self.buffer, Hide))
9495 }
9596
96− fn show_cursor(&mut self) -> io::Result<()> {
97− map_error(execute!(self.buffer, Show))
97+ fn show_cursor(&mut self, kind: CursorKind) -> io::Result<()> {
98+ let shape = match kind {
99+ CursorKind::Block => CursorShape::Block,
100+ CursorKind::Bar => CursorShape::Line,
101+ CursorKind::Underline => CursorShape::UnderScore,
102+ CursorKind::Hidden => unreachable!(),
103+ };
104+ map_error(execute!(self.buffer, Show, SetCursorShape(shape)))
98105 }
99106
100107 fn get_cursor(&mut self) -> io::Result<(u16, u16)> {