mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-23 12:43:09 +00:00
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:
commit
2bddfa209a
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue