projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
657c8a9
)
fix spurious == errors on console.pl input
author
Dirk Koopman
<djk@tobit.co.uk>
Sat, 11 Jul 2020 01:56:04 +0000
(
02:56
+0100)
committer
Dirk Koopman
<djk@tobit.co.uk>
Sat, 11 Jul 2020 01:56:04 +0000
(
02:56
+0100)
This only happens if it catches a character during the idle loop
which is the only way to catch Curses RESIZE signal. But a stray
"normal" character might get through as well.
perl/console.pl
patch
|
blob
|
history
diff --git
a/perl/console.pl
b/perl/console.pl
index f7b0d5f4690e7b7edbefb6d3335bc540cd24d9c0..78272aace8027843347d1c5d1c27dbd9e6d37494 100755
(executable)
--- a/
perl/console.pl
+++ b/
perl/console.pl
@@
-518,7
+518,7
@@
sub idle_loop
}
my $ch = $bot->getch(); # this is here just to catch RESIZE events
if (defined $ch) {
- if ($ch == KEY_RESIZE) {
+ if ($ch =
~ /^\d+$/ && $ch =
= KEY_RESIZE) {
doresize();
} else {
rec_stdin($ch) unless $ch == '-1';