Merge pull request #25 from ClementTsang/ignore_certain_chars

Skip control characters if they are somehow passed in as a char
This commit is contained in:
Clement Tsang 2020-02-24 20:41:20 -05:00 committed by GitHub
commit 2bddfa209a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -771,6 +771,12 @@ impl App {
pub fn on_char_key(&mut self, caught_char: char) {
// Forbid any char key presses when showing a dialog box...
// Skip control code chars
if caught_char.is_control() {
return;
}
if !self.is_in_dialog() {
let current_key_press_inst = Instant::now();
if current_key_press_inst