on master help sign in
fix: KeyEvent::char needs to ignore modifiers

Fixes #595

commit28919898e98541b3305b08d8f05606c060b8ae00 authorBlaž Hrastnik <blaz@mxxn.io> dateThu 26 Aug 2021, 09:21 (5 years ago) parent9d4c301
1 file changed+2−2
helix-view/src/input.rs+2−2
helix-view/src/input.rs+2−2
@@ -15,10 +15,10 @@ pub struct KeyEvent {
1515}
1616
1717impl KeyEvent {
18− /// If a character was pressed (without modifiers), return it.
18+ /// If a character was pressed, return it.
1919 pub fn char(&self) -> Option<char> {
2020 match self.code {
21− KeyCode::Char(ch) if self.modifiers.is_empty() => Some(ch),
21+ KeyCode::Char(ch) => Some(ch),
2222 _ => None,
2323 }
2424 }