aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-08-26 00:21:41 +0000
committerBlaž Hrastnik2021-08-26 00:21:41 +0000
commit28919898e98541b3305b08d8f05606c060b8ae00 (patch)
treeae59b1f9ebcfe4fed84a5be7ead671fad9e108bb /helix-view
parent9d4c3015632abba2ae6713874907825f6335b71a (diff)
fix: KeyEvent::char needs to ignore modifiers
Fixes #595
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/input.rs4
1 files 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<char> {
match self.code {
- KeyCode::Char(ch) if self.modifiers.is_empty() => Some(ch),
+ KeyCode::Char(ch) => Some(ch),
_ => None,
}
}