From 28919898e98541b3305b08d8f05606c060b8ae00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Thu, 26 Aug 2021 09:21:41 +0900 Subject: [PATCH] fix: KeyEvent::char needs to ignore modifiers Fixes #595 --- helix-view/src/input.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helix-view/src/input.rs b/helix-view/src/input.rs index 28b204bb..1e0ddfe2 100644 --- a/helix-view/src/input.rs +++ b/helix-view/src/input.rs @@ -15,10 +15,10 @@ pub struct KeyEvent { } impl KeyEvent { - /// If a character was pressed (without modifiers), return it. + /// If a character was pressed, return it. pub fn char(&self) -> Option { match self.code { - KeyCode::Char(ch) if self.modifiers.is_empty() => Some(ch), + KeyCode::Char(ch) => Some(ch), _ => None, } }