From ceaedad6dc40a9b4b284222ce6fdc43b28ef2d6b Mon Sep 17 00:00:00 2001 From: ClementTsang Date: Mon, 24 Feb 2020 20:07:38 -0500 Subject: [PATCH] Skip control characters if they are somehow passed in as a char to on_char_key. --- src/app.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app.rs b/src/app.rs index 6bf65675..cd44127e 100644 --- a/src/app.rs +++ b/src/app.rs @@ -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