Rename consts.rs to keys.rs
diff --git a/src/keymap.rs b/src/keymap.rs
index 877a12d..d36f8e2 100644
--- a/src/keymap.rs
+++ b/src/keymap.rs
@@ -5,7 +5,7 @@
use super::Result;
use config::Config;
use config::EditMode;
-use consts::KeyPress;
+use keys::KeyPress;
use tty::RawReader;
/// The number of times one command should be repeated.
diff --git a/src/consts.rs b/src/keys.rs
similarity index 100%
rename from src/consts.rs
rename to src/keys.rs
diff --git a/src/lib.rs b/src/lib.rs
index f6f68ea..f41641f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -33,13 +33,13 @@
pub mod completion;
pub mod config;
-mod consts;
mod edit;
pub mod error;
pub mod highlight;
pub mod hint;
pub mod history;
mod keymap;
+mod keys;
mod kill_ring;
pub mod line_buffer;
mod undo;
@@ -58,13 +58,13 @@
use completion::{longest_common_prefix, Candidate, Completer};
pub use config::{ColorMode, CompletionType, Config, EditMode, HistoryDuplicates};
-pub use consts::KeyPress;
use edit::State;
use highlight::Highlighter;
use hint::Hinter;
use history::{Direction, History};
pub use keymap::{Anchor, At, CharSearch, Cmd, Movement, RepeatCount, Word};
use keymap::{InputState, Refresher};
+pub use keys::KeyPress;
use kill_ring::{KillRing, Mode};
use line_buffer::WordAction;
diff --git a/src/test/common.rs b/src/test/common.rs
index 7fe8b17..29bde74 100644
--- a/src/test/common.rs
+++ b/src/test/common.rs
@@ -1,8 +1,8 @@
///! Basic commands tests.
use super::{assert_cursor, assert_line, assert_line_with_initial, init_editor};
use config::EditMode;
-use consts::KeyPress;
use error::ReadlineError;
+use keys::KeyPress;
#[test]
fn home_key() {
diff --git a/src/test/emacs.rs b/src/test/emacs.rs
index 67a1b10..a4c738e 100644
--- a/src/test/emacs.rs
+++ b/src/test/emacs.rs
@@ -1,7 +1,7 @@
//! Emacs specific key bindings
use super::{assert_cursor, assert_history};
use config::EditMode;
-use consts::KeyPress;
+use keys::KeyPress;
#[test]
fn ctrl_a() {
diff --git a/src/test/history.rs b/src/test/history.rs
index faa7a3f..dc3f8f0 100644
--- a/src/test/history.rs
+++ b/src/test/history.rs
@@ -1,7 +1,7 @@
//! History related commands tests
use super::assert_history;
use config::EditMode;
-use consts::KeyPress;
+use keys::KeyPress;
#[test]
fn down_key() {
diff --git a/src/test/mod.rs b/src/test/mod.rs
index 1ce9881..8642b03 100644
--- a/src/test/mod.rs
+++ b/src/test/mod.rs
@@ -4,9 +4,9 @@
use super::{Editor, Result};
use completion::Completer;
use config::{Config, EditMode};
-use consts::KeyPress;
use edit::init_state;
use keymap::{Cmd, InputState};
+use keys::KeyPress;
use tty::Sink;
mod common;
diff --git a/src/test/vi_cmd.rs b/src/test/vi_cmd.rs
index 1c1e4e9..d8ec793 100644
--- a/src/test/vi_cmd.rs
+++ b/src/test/vi_cmd.rs
@@ -1,7 +1,7 @@
//! Vi command mode specific key bindings
use super::{assert_cursor, assert_history};
use config::EditMode;
-use consts::KeyPress;
+use keys::KeyPress;
#[test]
fn dollar() {
diff --git a/src/test/vi_insert.rs b/src/test/vi_insert.rs
index cf86680..fa3c881 100644
--- a/src/test/vi_insert.rs
+++ b/src/test/vi_insert.rs
@@ -1,7 +1,7 @@
//! Vi insert mode specific key bindings
use super::assert_cursor;
use config::EditMode;
-use consts::KeyPress;
+use keys::KeyPress;
#[test]
fn insert_mode_by_default() {
diff --git a/src/tty/mod.rs b/src/tty/mod.rs
index d6767fc..e36ff80 100644
--- a/src/tty/mod.rs
+++ b/src/tty/mod.rs
@@ -4,8 +4,8 @@
use unicode_width::UnicodeWidthStr;
use config::{ColorMode, Config};
-use consts::KeyPress;
use highlight::Highlighter;
+use keys::KeyPress;
use line_buffer::LineBuffer;
use Result;
diff --git a/src/tty/test.rs b/src/tty/test.rs
index 75844be..b1a47d9 100644
--- a/src/tty/test.rs
+++ b/src/tty/test.rs
@@ -5,9 +5,9 @@
use super::{truncate, Position, RawMode, RawReader, Renderer, Term};
use config::{ColorMode, Config};
-use consts::KeyPress;
use error::ReadlineError;
use highlight::Highlighter;
+use keys::KeyPress;
use line_buffer::LineBuffer;
use Result;
diff --git a/src/tty/unix.rs b/src/tty/unix.rs
index 5a8b20f..ffb81e9 100644
--- a/src/tty/unix.rs
+++ b/src/tty/unix.rs
@@ -15,9 +15,9 @@
use super::{truncate, width, Position, RawMode, RawReader, Renderer, Term};
use config::{ColorMode, Config};
-use consts::{self, KeyPress};
use error;
use highlight::Highlighter;
+use keys::{self, KeyPress};
use line_buffer::LineBuffer;
use Result;
@@ -310,7 +310,7 @@
fn next_key(&mut self, single_esc_abort: bool) -> Result<KeyPress> {
let c = try!(self.next_char());
- let mut key = consts::char_to_key_press(c);
+ let mut key = keys::char_to_key_press(c);
if key == KeyPress::Esc {
let timeout_ms = if single_esc_abort && self.timeout_ms == -1 {
0
@@ -645,8 +645,9 @@
| InputFlags::ISTRIP
| InputFlags::IXON);
// we don't want raw output, it turns newlines into straight linefeeds
- // raw.c_oflag = raw.c_oflag & !(OutputFlags::OPOST); // disable all output
- // processing
+ // disable all output processing
+ // raw.c_oflag = raw.c_oflag & !(OutputFlags::OPOST);
+
// character-size mark (8 bits)
raw.control_flags |= ControlFlags::CS8;
// disable echoing, canonical mode, extended input processing and signals
diff --git a/src/tty/windows.rs b/src/tty/windows.rs
index 103ec44..50d0355 100644
--- a/src/tty/windows.rs
+++ b/src/tty/windows.rs
@@ -10,9 +10,9 @@
use super::{truncate, Position, RawMode, RawReader, Renderer, Term};
use config::{ColorMode, Config};
-use consts::{self, KeyPress};
use error;
use highlight::Highlighter;
+use keys::{self, KeyPress};
use line_buffer::LineBuffer;
use Result;
@@ -229,7 +229,7 @@
if meta {
return Ok(KeyPress::Meta(c));
} else {
- return Ok(consts::char_to_key_press(c));
+ return Ok(keys::char_to_key_press(c));
}
}
}