projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changed some stop_msg calls in DXProt to $call
[spider.git]
/
perl
/
console.pl
diff --git
a/perl/console.pl
b/perl/console.pl
index 29817564533c95cd37b243435c683c13c06409ab..14c945a58987edabecd084078caf58eedca9ed38 100755
(executable)
--- a/
perl/console.pl
+++ b/
perl/console.pl
@@
-186,7
+186,7
@@
sub rec_stdin
} else {
beep();
}
} else {
beep();
}
- } elsif ($r eq KEY_PPAGE || $r eq "\0
26
") {
+ } elsif ($r eq KEY_PPAGE || $r eq "\0
32
") {
if ($spos > 0) {
$spos -= $pages;
$spos = 0 if $spos < 0;
if ($spos > 0) {
$spos -= $pages;
$spos = 0 if $spos < 0;
@@
-194,7
+194,7
@@
sub rec_stdin
} else {
beep();
}
} else {
beep();
}
- } elsif ($r eq KEY_NPAGE || $r eq "\0
32
") {
+ } elsif ($r eq KEY_NPAGE || $r eq "\0
26
") {
if ($spos < @shistory - 1) {
$spos += $pages;
$spos = @shistory if $spos > @shistory;
if ($spos < @shistory - 1) {
$spos += $pages;
$spos = @shistory if $spos > @shistory;
@@
-216,6
+216,8
@@
sub rec_stdin
}
} elsif ($r eq KEY_HOME || $r eq "\001") {
$pos = 0;
}
} 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);
} elsif ($r eq KEY_BACKSPACE || $r eq "\010") {
if ($pos > 0) {
my $a = substr($inbuf, 0, $pos-1);
@@
-250,11
+252,14
@@
sub rec_stdin
$pos++;
$lth++;
} elsif ($r eq "\014" || $r eq "\022") {
$pos++;
$lth++;
} elsif ($r eq "\014" || $r eq "\022") {
+ $top->touchwin();
+ $bot->touchwin();
$scr->touchwin();
$scr->refresh();
$scr->touchwin();
$scr->refresh();
+ $top->refresh();
} elsif ($r eq "\013") {
} elsif ($r eq "\013") {
- $inbuf =
""
;
- $
pos = $lth = 0
;
+ $inbuf =
substr($inbuf, 0, $pos)
;
+ $
lth = length $inbuf
;
} else {
beep();
}
} else {
beep();
}