aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/src
diff options
context:
space:
mode:
authorMichael Davis2023-01-11 02:48:26 +0000
committerBlaž Hrastnik2023-02-28 03:35:52 +0000
commit79bf5e3094e16a34637703b14c7bf090d2dcf155 (patch)
treee21867b85eb4ffaad4ffa749222034c8a69e8c12 /helix-tui/src
parenta976786a4fa013150ec1b59ae55276361e61340f (diff)
Update crossterm to 0.26.1
Crossterm 0.26.x includes a breaking change for the command to set the cursor shape. This commit includes a change which uses the new type.
Diffstat (limited to 'helix-tui/src')
-rw-r--r--helix-tui/src/backend/crossterm.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/helix-tui/src/backend/crossterm.rs b/helix-tui/src/backend/crossterm.rs
index c00e1f40..5305640c 100644
--- a/helix-tui/src/backend/crossterm.rs
+++ b/helix-tui/src/backend/crossterm.rs
@@ -1,6 +1,6 @@
use crate::{backend::Backend, buffer::Cell};
use crossterm::{
- cursor::{CursorShape, Hide, MoveTo, SetCursorShape, Show},
+ cursor::{Hide, MoveTo, SetCursorStyle, Show},
execute, queue,
style::{
Attribute as CAttribute, Color as CColor, Print, SetAttribute, SetBackgroundColor,
@@ -156,12 +156,12 @@ where
fn show_cursor(&mut self, kind: CursorKind) -> io::Result<()> {
let shape = match kind {
- CursorKind::Block => CursorShape::Block,
- CursorKind::Bar => CursorShape::Line,
- CursorKind::Underline => CursorShape::UnderScore,
+ CursorKind::Block => SetCursorStyle::SteadyBlock,
+ CursorKind::Bar => SetCursorStyle::SteadyBar,
+ CursorKind::Underline => SetCursorStyle::SteadyUnderScore,
CursorKind::Hidden => unreachable!(),
};
- map_error(execute!(self.buffer, Show, SetCursorShape(shape)))
+ map_error(execute!(self.buffer, Show, shape))
}
fn get_cursor(&mut self) -> io::Result<(u16, u16)> {