Commit bdbe03b8 authored by Matthew Nicholson's avatar Matthew Nicholson
Browse files

use vi and emacs KeyMaps in Context

parent 86e091a1
......@@ -74,7 +74,10 @@ impl Context {
let res = {
let stdout = stdout().into_raw_mode().unwrap();
let ed = try!(Editor::new(stdout, prompt.into(), self));
Self::handle_keys(keymap::Emacs::new(ed), handler)
match self.key_bindings {
KeyBindings::Emacs => Self::handle_keys(keymap::Emacs::new(ed), handler),
KeyBindings::Vi => Self::handle_keys(keymap::Vi::new(ed), handler),
}
};
self.revert_all_history();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment