aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-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;