on master help sign in
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.

commit79bf5e3094e16a34637703b14c7bf090d2dcf155 authorMichael Davis <mcarsondavis@gmail.com> dateTue 10 Jan 2023, 20:48 (4 years ago) parenta976786
5 files changed+10−10
Cargo.lock+2−2 helix-term/Cargo.toml+1−1 helix-tui/Cargo.toml+1−1 helix-tui/src/backend/crossterm.rs+5−5 helix-view/Cargo.toml+1−1
Cargo.lock+2−2
@@ -261,9 +261,9 @@ dependencies = [
261261
262262[[package]]
263263name = "crossterm"
264−version = "0.25.0"
264+version = "0.26.1"
265265source = "registry+https://github.com/rust-lang/crates.io-index"
266−checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67"
266+checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13"
267267dependencies = [
268268 "bitflags",
269269 "crossterm_winapi",
helix-term/Cargo.toml+1−1
@@ -37,7 +37,7 @@ which = "4.4"
3737
3838tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot"] }
3939tui = { path = "../helix-tui", package = "helix-tui", default-features = false, features = ["crossterm"] }
40−crossterm = { version = "0.25", features = ["event-stream"] }
40+crossterm = { version = "0.26", features = ["event-stream"] }
4141signal-hook = "0.3"
4242tokio-stream = "0.1"
4343futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false }
helix-tui/Cargo.toml+1−1
@@ -19,7 +19,7 @@ default = ["crossterm"]
1919bitflags = "1.3"
2020cassowary = "0.3"
2121unicode-segmentation = "1.10"
22−crossterm = { version = "0.25", optional = true }
22+crossterm = { version = "0.26", optional = true }
2323termini = "0.1"
2424serde = { version = "1", "optional" = true, features = ["derive"]}
2525helix-view = { version = "0.6", path = "../helix-view", features = ["term"] }
helix-tui/src/backend/crossterm.rs+5−5
@@ -1,6 +1,6 @@
11use crate::{backend::Backend, buffer::Cell};
22use crossterm::{
3− cursor::{CursorShape, Hide, MoveTo, SetCursorShape, Show},
3+ cursor::{Hide, MoveTo, SetCursorStyle, Show},
44 execute, queue,
55 style::{
66 Attribute as CAttribute, Color as CColor, Print, SetAttribute, SetBackgroundColor,
@@ -156,12 +156,12 @@ where
156156
157157 fn show_cursor(&mut self, kind: CursorKind) -> io::Result<()> {
158158 let shape = match kind {
159− CursorKind::Block => CursorShape::Block,
160− CursorKind::Bar => CursorShape::Line,
161− CursorKind::Underline => CursorShape::UnderScore,
159+ CursorKind::Block => SetCursorStyle::SteadyBlock,
160+ CursorKind::Bar => SetCursorStyle::SteadyBar,
161+ CursorKind::Underline => SetCursorStyle::SteadyUnderScore,
162162 CursorKind::Hidden => unreachable!(),
163163 };
164− map_error(execute!(self.buffer, Show, SetCursorShape(shape)))
164+ map_error(execute!(self.buffer, Show, shape))
165165 }
166166
167167 fn get_cursor(&mut self) -> io::Result<(u16, u16)> {
helix-view/Cargo.toml+1−1
@@ -20,7 +20,7 @@ helix-core = { version = "0.6", path = "../helix-core" }
2020helix-loader = { version = "0.6", path = "../helix-loader" }
2121helix-lsp = { version = "0.6", path = "../helix-lsp" }
2222helix-dap = { version = "0.6", path = "../helix-dap" }
23−crossterm = { version = "0.25", optional = true }
23+crossterm = { version = "0.26", optional = true }
2424helix-vcs = { version = "0.6", path = "../helix-vcs" }
2525
2626# Conversion traits