projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
22e5a37
)
fixed ^K handling
R_1_30
author
djk
<djk>
Tue, 29 Jun 1999 10:40:13 +0000
(10:40 +0000)
committer
djk
<djk>
Tue, 29 Jun 1999 10:40:13 +0000
(10:40 +0000)
perl/console.pl
patch
|
blob
|
history
diff --git
a/perl/console.pl
b/perl/console.pl
index 35924e4c08a2a02f1f2be26dcab53a28d3be6769..977285dad1e1db43d60f215a7ee7d67c38c3c906 100755
(executable)
--- a/
perl/console.pl
+++ b/
perl/console.pl
@@
-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);
@@
-253,8
+255,8
@@
sub rec_stdin
$scr->touchwin();
$scr->refresh();
} elsif ($r eq "\013") {
$scr->touchwin();
$scr->refresh();
} elsif ($r eq "\013") {
- $inbuf =
""
;
- $
pos = $lth = 0
;
+ $inbuf =
substr($inbuf, 0, $pos)
;
+ $
lth = length $inbuf
;
} else {
beep();
}
} else {
beep();
}