summaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorIvan Tham2021-06-22 17:04:04 +0000
committerBlaž Hrastnik2021-06-24 15:39:03 +0000
commit10548bf0e32209e02460021cc8ca4865c4c75bf7 (patch)
treebed9421daebdf404ce833d797e32e2c1f515a041 /helix-term/src/ui
parent15ae2e7ef1a7c33733c999e9018cca22cdae1da9 (diff)
Fix previous broken refactor key into helix-view
Need to be used for autoinfo Revert "Revert "Refactor key into helix-view"" This reverts commit 10f9f72232f5789323d689bf0f9cd359715770d6.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index c4322de0..1c443bc7 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -12,12 +12,13 @@ use helix_core::{
LineEnding, Position, Range,
};
use helix_lsp::LspProgressMap;
+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,
@@ -659,7 +660,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;