fixed ^K handling

This commit is contained in:
djk 1999-06-29 10:40:13 +00:00
parent 22e5a371c4
commit 2f4355fb63

View File

@ -216,6 +216,8 @@ sub rec_stdin
}
} elsif ($r eq KEY_HOME || $r eq "\001") {
$pos = 0;
} elsif ($r eq KEY_END || $r eq "\005") {
$pos = $lth;
} elsif ($r eq KEY_BACKSPACE || $r eq "\010") {
if ($pos > 0) {
my $a = substr($inbuf, 0, $pos-1);
@ -253,8 +255,8 @@ sub rec_stdin
$scr->touchwin();
$scr->refresh();
} elsif ($r eq "\013") {
$inbuf = "";
$pos = $lth = 0;
$inbuf = substr($inbuf, 0, $pos);
$lth = length $inbuf;
} else {
beep();
}