X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fconsole.pl;h=50196907829e16608af9cfc0a4f95f0132efdbcb;hb=11056ea11fce910aa0e0d183a1cce73cf0de1c21;hp=41eb8016cc38249e2eccb891b38fedc05cede131;hpb=8cf374587593eacd30423223278ed63df45babc6;p=spider.git diff --git a/perl/console.pl b/perl/console.pl index 41eb8016..50196907 100755 --- a/perl/console.pl +++ b/perl/console.pl @@ -159,6 +159,7 @@ sub rec_stdin # $prbuf =~ s/\n/\\n/; # print "sys: $r ($prbuf)\n"; if (defined $r) { + if ($r eq KEY_ENTER || $r eq "\n" || $r eq "\r") { # save the lines @@ -266,6 +267,13 @@ sub rec_stdin beep(); } } elsif ($r ge ' ' && $r le '~') { + # move the top screen back to the bottom if you type something + if ($spos < @shistory - 1) { + $spos = @shistory; + show_screen(); + } + + # insert the character into the keyboard buffer if ($pos < $lth) { my $a = substr($inbuf, 0, $pos); my $b = substr($inbuf, $pos);