X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fconsole.pl;h=887600e31ee6438ca9f96188b13fd5c2e60b5d93;hb=aedd7de39e1fd743e05ff2fb9fb286a616bb50b3;hp=cec17ab4495b5fc2e14833df17cf2b6b7de174f6;hpb=ce2e3045bad021ba833c91dcc45b779a57752960;p=spider.git diff --git a/perl/console.pl b/perl/console.pl index cec17ab4..887600e3 100755 --- a/perl/console.pl +++ b/perl/console.pl @@ -137,7 +137,7 @@ sub measure # display the top screen sub show_screen { - if ($spos >= @shistory - 1) { + if ($spos == @shistory - 1) { # if we really are scrolling thru at the end of the history my $line = $shistory[$spos]; @@ -188,9 +188,11 @@ sub show_screen # add a line to the end of the top screen sub addtotop { - my $inbuf = shift; - push @shistory, $inbuf; - shift @shistory if @shistory > $maxshist; + while (@_) { + my $inbuf = shift; + push @shistory, $inbuf; + shift @shistory if @shistory > $maxshist; + } show_screen(); }