From 2f008188e3b9c407dae3bc70ee0133eb2331f447 Mon Sep 17 00:00:00 2001 From: ticki Date: Sun, 6 Nov 2016 10:26:45 +0100 Subject: [PATCH] Add @gycos to the author list. --- Cargo.toml | 2 +- src/event.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5a4b613..dae7376 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "termion" version = "1.1.2" -authors = ["ticki "] +authors = ["ticki ", "gycos "] description = "A bindless library for manipulating terminals." repository = "https://github.com/ticki/termion" documentation = "https://docs.rs/termion" diff --git a/src/event.rs b/src/event.rs index 423a5c5..9b993d3 100644 --- a/src/event.rs +++ b/src/event.rs @@ -226,19 +226,19 @@ where I: Iterator> // Special key code. b'~' => { let str_buf = String::from_utf8(buf).unwrap(); - - // This CSI sequence can be a list of - // semicolon-separated numbers. + + // This CSI sequence can be a list of semicolon-separated + // numbers. let nums: Vec = str_buf.split(';') .map(|n| n.parse().unwrap()) .collect(); - + if nums.is_empty() { return error; } - - // TODO: handle multiple values for key modififiers - // (ex: values [3, 2] means Shift+Delete) + + // TODO: handle multiple values for key modififiers (ex: values + // [3, 2] means Shift+Delete) match nums[0] { 1 | 7 => Event::Key(Key::Home), 2 => Event::Key(Key::Insert),