diff options
author | Jan Hrastnik | 2021-06-03 10:39:44 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-03 14:16:04 +0000 |
commit | daad8ebe1294ce11392c4a8d2c0316498d1247cf (patch) | |
tree | 0bca3c64d985d2f1746397152fa629ccc45385c1 /helix-term | |
parent | 68abc67ec6846ab4d05b0e46d1baa65dc026e7dd (diff) |
key_canonicalization now only matches chars
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/ui/editor.rs | 10 |
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 +} |