aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorJan Hrastnik2021-06-03 10:39:44 +0000
committerBlaž Hrastnik2021-06-03 14:16:04 +0000
commitdaad8ebe1294ce11392c4a8d2c0316498d1247cf (patch)
tree0bca3c64d985d2f1746397152fa629ccc45385c1 /helix-term
parent68abc67ec6846ab4d05b0e46d1baa65dc026e7dd (diff)
key_canonicalization now only matches chars
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/ui/editor.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 0b0ad5ed..da95763e 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -692,8 +692,12 @@ impl Component for EditorView {
}
fn canonicalize_key(key: &mut KeyEvent) -> KeyEvent {
- if let KeyEvent { code: KeyCode::Char(_), modifiers: KeyModifiers::SHIFT } = key {
- key.modifiers = KeyModifiers::NONE;
+ if let KeyEvent {
+ code: KeyCode::Char(_),
+ modifiers: _,
+ } = key
+ {
+ key.modifiers.remove(KeyModifiers::SHIFT)
}
*key
-} \ No newline at end of file
+}