mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-11-24 16:35:39 +03:00
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.
This commit is contained in:
parent
a976786a4f
commit
79bf5e3094
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -261,9 +261,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "crossterm"
|
||||
version = "0.25.0"
|
||||
version = "0.26.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67"
|
||||
checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"crossterm_winapi",
|
||||
|
@ -37,7 +37,7 @@ which = "4.4"
|
||||
|
||||
tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot"] }
|
||||
tui = { path = "../helix-tui", package = "helix-tui", default-features = false, features = ["crossterm"] }
|
||||
crossterm = { version = "0.25", features = ["event-stream"] }
|
||||
crossterm = { version = "0.26", features = ["event-stream"] }
|
||||
signal-hook = "0.3"
|
||||
tokio-stream = "0.1"
|
||||
futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false }
|
||||
|
@ -19,7 +19,7 @@ default = ["crossterm"]
|
||||
bitflags = "1.3"
|
||||
cassowary = "0.3"
|
||||
unicode-segmentation = "1.10"
|
||||
crossterm = { version = "0.25", optional = true }
|
||||
crossterm = { version = "0.26", optional = true }
|
||||
termini = "0.1"
|
||||
serde = { version = "1", "optional" = true, features = ["derive"]}
|
||||
helix-view = { version = "0.6", path = "../helix-view", features = ["term"] }
|
||||
|
@ -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)> {
|
||||
|
@ -20,7 +20,7 @@ helix-core = { version = "0.6", path = "../helix-core" }
|
||||
helix-loader = { version = "0.6", path = "../helix-loader" }
|
||||
helix-lsp = { version = "0.6", path = "../helix-lsp" }
|
||||
helix-dap = { version = "0.6", path = "../helix-dap" }
|
||||
crossterm = { version = "0.25", optional = true }
|
||||
crossterm = { version = "0.26", optional = true }
|
||||
helix-vcs = { version = "0.6", path = "../helix-vcs" }
|
||||
|
||||
# Conversion traits
|
||||
|
Loading…
Reference in New Issue
Block a user