From daad8ebe1294ce11392c4a8d2c0316498d1247cf Mon Sep 17 00:00:00 2001
From: Jan Hrastnik <jan.hrastnik2@gmail.com>
Date: Thu, 3 Jun 2021 12:39:44 +0200
Subject: [PATCH] key_canonicalization now only matches chars

---
 helix-term/src/ui/editor.rs | 10 +++++++---
 1 file 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
+}