diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 0b0ad5edd..da95763ed 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -692,8 +692,12 @@ fn cursor_position(&self, area: Rect, editor: &Editor) -> Option { } 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 +}