on master help sign in
key_canonicalization now only matches chars
commitdaad8ebe1294ce11392c4a8d2c0316498d1247cf authorJan Hrastnik <jan.hrastnik2@gmail.com> dateThu 3 Jun 2021, 12:39 (5 years ago) parent68abc67
1 file changed+7−3
helix-term/src/ui/editor.rs+7−3
helix-term/src/ui/editor.rs+7−3
@@ -692,8 +692,12 @@ impl Component for EditorView {
692692}
693693
694694fn canonicalize_key(key: &mut KeyEvent) -> KeyEvent {
695− if let KeyEvent { code: KeyCode::Char(_), modifiers: KeyModifiers::SHIFT } = key {
696− key.modifiers = KeyModifiers::NONE;
695+ if let KeyEvent {
696+ code: KeyCode::Char(_),
697+ modifiers: _,
698+ } = key
699+ {
700+ key.modifiers.remove(KeyModifiers::SHIFT)
697701 }
698702 *key
699−}
703+}