X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fconsole.pl;h=d98b95f8f18b5ef93b84ca8ee740193586d15820;hb=64461bf14f8ce1a01d420a01f1cf056f13b7385b;hp=88ffb92787589a527ebf03f51983b053de466bdb;hpb=e69a98ce612592a78aca2a3ac4e2388a06059955;p=spider.git diff --git a/perl/console.pl b/perl/console.pl index 88ffb927..d98b95f8 100755 --- a/perl/console.pl +++ b/perl/console.pl @@ -10,7 +10,7 @@ # # Copyright (c) 1999 Dirk Koopman G1TLH # -# $Id$ +# # require 5.004; @@ -230,7 +230,7 @@ sub addtotop if ($inbuf =~ s/\x07+$//) { beep(); } - if (length $inbuf > $cols) { + if (length $inbuf >= $cols) { $Text::Wrap::Columns = $cols; push @shistory, wrap('',"\t", $inbuf); } else { @@ -340,7 +340,7 @@ sub rec_stdin } elsif ($r eq KEY_PPAGE || $r eq "\032") { if ($spos > 0) { my ($i, $l); - for ($i = 0; $i <= $pagel-1 && $spos >= 0; ) { + for ($i = 0; $i < $pagel-1 && $spos >= 0; ) { $l = measure($shistory[$spos]); $i += $l; $spos-- if $i <= $pagel;