projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed typo in /spider/cmd/set/register.pl from reqreq to reqreg
[spider.git]
/
perl
/
console.pl
diff --git
a/perl/console.pl
b/perl/console.pl
index 2be859894ad459b1ffdbf7ae0fc707a442fa7e94..4dba480b03ea56b19d60b8d68a89b382a9d6cabe 100755
(executable)
--- a/
perl/console.pl
+++ b/
perl/console.pl
@@
-79,7
+79,7
@@
sub do_initscr
init_pair(12, COLOR_MAGENTA, COLOR_BLUE);
init_pair(13, COLOR_YELLOW, COLOR_GREEN);
init_pair(14, COLOR_RED, COLOR_GREEN);
init_pair(12, COLOR_MAGENTA, COLOR_BLUE);
init_pair(13, COLOR_YELLOW, COLOR_GREEN);
init_pair(14, COLOR_RED, COLOR_GREEN);
-
assume_default_colors($foreground, $background)
;
+
eval { assume_default_colors($foreground, $background) }
;
}
$top = $scr->subwin($lines-4, $cols, 0, 0);
}
$top = $scr->subwin($lines-4, $cols, 0, 0);
@@
-361,7
+361,7
@@
sub rec_stdin
$pos = 0;
} elsif ($r eq KEY_END || $r eq "\005") {
$pos = $lth;
$pos = 0;
} elsif ($r eq KEY_END || $r eq "\005") {
$pos = $lth;
- } elsif ($r eq KEY_BACKSPACE || $r eq "\010") {
+ } elsif ($r eq KEY_BACKSPACE || $r eq "\010"
|| $r eq "\0177"
) {
if ($pos > 0) {
my $a = substr($inbuf, 0, $pos-1);
my $b = substr($inbuf, $pos) if $pos < $lth;
if ($pos > 0) {
my $a = substr($inbuf, 0, $pos-1);
my $b = substr($inbuf, $pos) if $pos < $lth;