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);
$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;