From 0c1244f580bf97eb0ba7a10ee45f1272e692e508 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Fri, 6 Mar 2020 08:24:26 -0800 Subject: [PATCH] Use git version of crossterm until next version is released --- Cargo.toml | 5 +++-- src/backend/curses/n.rs | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7d0ef97..3403d26 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,10 +74,11 @@ version = "1.5.3" [dependencies.crossterm] optional = true -version = "0.16" +git = "https://github.com/crossterm-rs/crossterm" +commit = "33b90c85c96e1452deb6e978ce06d9cb6f6da1a9" [target.'cfg(unix)'.dependencies] -signal-hook = "0.1.10" +signal-hook = "0.1" [dev-dependencies] rand = "0.7.0" diff --git a/src/backend/curses/n.rs b/src/backend/curses/n.rs index 3e04534..8c5e681 100644 --- a/src/backend/curses/n.rs +++ b/src/backend/curses/n.rs @@ -103,7 +103,6 @@ impl Backend { // Don't echo user input, we'll take care of that ncurses::noecho(); // This disables buffering and some input processing. - // TODO: use ncurses::raw() ? ncurses::raw(); // This enables color support. ncurses::start_color(); @@ -507,8 +506,8 @@ fn initialize_keymap() -> HashMap { for c in 1..=26 { let event = match c { - // This is Ctrl+C - // TODO: Don't exit here, but add this as a default callback + // Ctrl-i and Ctrl-j are special, they use the same codes as Tab + // and Enter respecively. There's just no way to detect them. :( 9 => Event::Key(Key::Tab), 10 => Event::Key(Key::Enter), other => Event::CtrlChar((b'a' - 1 + other as u8) as char),