diff options
author | Ivan Tham | 2021-06-17 16:52:41 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-19 07:37:15 +0000 |
commit | ca806d4f852e934651132fc9570a6110e30f646d (patch) | |
tree | 66e3fcfd6c018f435e23aee30aafd367ec39d7f2 /helix-term/src/ui | |
parent | 1c2585202145467f0fde7ad9c571e462081c3656 (diff) |
Refactor key into helix-view
Now also make use of Deserialize for Config.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/editor.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 3dc43d3f..d0eedad6 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -11,12 +11,13 @@ use helix_core::{ syntax::{self, HighlightEvent}, Position, Range, }; +use helix_view::input::{KeyCode, KeyEvent, KeyModifiers}; use helix_view::{document::Mode, Document, Editor, Theme, View}; use std::borrow::Cow; use crossterm::{ cursor, - event::{read, Event, EventStream, KeyCode, KeyEvent, KeyModifiers}, + event::{read, Event, EventStream}, }; use tui::{ backend::CrosstermBackend, @@ -607,7 +608,8 @@ impl Component for EditorView { cx.editor.resize(Rect::new(0, 0, width, height - 1)); EventResult::Consumed(None) } - Event::Key(mut key) => { + Event::Key(key) => { + let mut key = KeyEvent::from(key); canonicalize_key(&mut key); // clear status cx.editor.status_msg = None; |