diff options
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/input.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/input.rs b/helix-view/src/input.rs index 8d9ee6fb..28b204bb 100644 --- a/helix-view/src/input.rs +++ b/helix-view/src/input.rs @@ -15,10 +15,10 @@ pub struct KeyEvent { } impl KeyEvent { - /// Get only the character involved in this event + /// If a character was pressed (without modifiers), return it. pub fn char(&self) -> Option<char> { match self.code { - KeyCode::Char(ch) => Some(ch), + KeyCode::Char(ch) if self.modifiers.is_empty() => Some(ch), _ => None, } } |