aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-06-19 14:59:19 +0000
committerBlaž Hrastnik2021-06-19 14:59:19 +0000
commit10f9f72232f5789323d689bf0f9cd359715770d6 (patch)
treedbf4f6ab6221b7522445fa765079ee61f47294bb /helix-term/src/ui
parent11f20af25fa7335f3f49c0e33d6a2790d60c9647 (diff)
Revert "Refactor key into helix-view"
Did not use defaults when custom keymap was used This reverts commit ca806d4f852e934651132fc9570a6110e30f646d.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index d0eedad6..3dc43d3f 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -11,13 +11,12 @@ 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},
+ event::{read, Event, EventStream, KeyCode, KeyEvent, KeyModifiers},
};
use tui::{
backend::CrosstermBackend,
@@ -608,8 +607,7 @@ impl Component for EditorView {
cx.editor.resize(Rect::new(0, 0, width, height - 1));
EventResult::Consumed(None)
}
- Event::Key(key) => {
- let mut key = KeyEvent::from(key);
+ Event::Key(mut key) => {
canonicalize_key(&mut key);
// clear status
cx.editor.status_msg = None;