diff --git a/Cargo.lock b/Cargo.lock index 93879ebc..a6813cf4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "arc-swap" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" - [[package]] name = "arrayref" version = "0.3.6" @@ -399,9 +393,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" +checksum = "7e31d442c16f047a671b5a71e2161d6e68814012b7f5379d269ebd915fac2729" dependencies = [ "libc", "mio", @@ -410,11 +404,10 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" +checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" dependencies = [ - "arc-swap", "libc", ] diff --git a/crates/irust/Cargo.toml b/crates/irust/Cargo.toml index 3f8b8533..a3e71d5f 100644 --- a/crates/irust/Cargo.toml +++ b/crates/irust/Cargo.toml @@ -9,7 +9,6 @@ repository = "https://github.com/sigmaSd/IRust" license = "MIT" [dependencies] -crossterm = { version = "0.19.0", features = ["serde"] } dirs-next = "2.0.0" toml = "0.5.8" serde = { version = "1.0.125", features = ["derive"] } @@ -18,6 +17,7 @@ irust_api = { path = "../irust_api/", version = "0.3.0" } irust_repl = { path = "../irust_repl", version = "0.3.0", features = ["serde"] } libloading = "0.7.0" bincode = "1.3.3" +crossterm = { version = "0.19.0", features = ["serde"] } [target.'cfg(unix)'.dependencies] nix = "0.20.0" diff --git a/crates/irust/src/irust/engine.rs b/crates/irust/src/irust/engine.rs index ceb1273e..2a054248 100644 --- a/crates/irust/src/irust/engine.rs +++ b/crates/irust/src/irust/engine.rs @@ -1,4 +1,5 @@ use crossterm::{ + // cursor::{CursorShape, SetCursorShape}, event::{Event, KeyCode, KeyEvent, KeyModifiers}, style::Color, terminal::ClearType, @@ -574,8 +575,14 @@ impl IRust { self.printer.cursor.show(); Ok(()) } - Command::SetThinCursor => Ok(()), - Command::SetWideCursor => Ok(()), + Command::SetThinCursor => Ok(()), /*Ok(crossterm::queue!( + std::io::stdout(), + SetCursorShape(CursorShape::Line) + )?),*/ + Command::SetWideCursor => Ok(()), /*Ok(crossterm::queue!( + std::io::stdout(), + SetCursorShape(CursorShape::Block) + )?),*/ } } diff --git a/crates/printer/Cargo.toml b/crates/printer/Cargo.toml index 72e7b3d1..21d59eb6 100644 --- a/crates/printer/Cargo.toml +++ b/crates/printer/Cargo.toml @@ -8,7 +8,5 @@ description = "Abstraction over terminal manipulation" repository = "https://github.com/sigmaSd/IRust/tree/master/crates/printer" license = "MIT" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] crossterm = "0.19.0" diff --git a/scripts_examples/script2/input_event/src/main.rs b/scripts_examples/script2/input_event/src/main.rs index 2e354d90..1a81060e 100644 --- a/scripts_examples/script2/input_event/src/main.rs +++ b/scripts_examples/script2/input_event/src/main.rs @@ -106,7 +106,7 @@ fn main() { code: KeyCode::Esc, .. } => { Mode::set(Mode::Normal); - None + Some(Command::SetWideCursor) } _ => None, },