summaryrefslogtreecommitdiff
path: root/helix-view/src/keyboard.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-12-06 03:24:25 +0000
committerBlaž Hrastnik2021-12-06 03:25:19 +0000
commitcab09093dd5bf9b4707bfdfd8529b348c02670ea (patch)
tree352f34c1b5478948ab62d1169428ec8b6da8297a /helix-view/src/keyboard.rs
parent461cd2056336c26138c96a4f0769f08d527be039 (diff)
fix: Normalize backtab into shift-tab
Fixes #1150
Diffstat (limited to 'helix-view/src/keyboard.rs')
-rw-r--r--helix-view/src/keyboard.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/helix-view/src/keyboard.rs b/helix-view/src/keyboard.rs
index 810aa063..f1717209 100644
--- a/helix-view/src/keyboard.rs
+++ b/helix-view/src/keyboard.rs
@@ -79,8 +79,6 @@ pub enum KeyCode {
PageDown,
/// Tab key.
Tab,
- /// Shift + Tab key.
- BackTab,
/// Delete key.
Delete,
/// Insert key.
@@ -116,7 +114,6 @@ impl From<KeyCode> for crossterm::event::KeyCode {
KeyCode::PageUp => CKeyCode::PageUp,
KeyCode::PageDown => CKeyCode::PageDown,
KeyCode::Tab => CKeyCode::Tab,
- KeyCode::BackTab => CKeyCode::BackTab,
KeyCode::Delete => CKeyCode::Delete,
KeyCode::Insert => CKeyCode::Insert,
KeyCode::F(f_number) => CKeyCode::F(f_number),
@@ -144,7 +141,7 @@ impl From<crossterm::event::KeyCode> for KeyCode {
CKeyCode::PageUp => KeyCode::PageUp,
CKeyCode::PageDown => KeyCode::PageDown,
CKeyCode::Tab => KeyCode::Tab,
- CKeyCode::BackTab => KeyCode::BackTab,
+ CKeyCode::BackTab => unreachable!("BackTab should have been handled on KeyEvent level"),
CKeyCode::Delete => KeyCode::Delete,
CKeyCode::Insert => KeyCode::Insert,
CKeyCode::F(f_number) => KeyCode::F(f_number),