# 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
- $spos = @shistory - 1 if $spos >= @shistory;
my $line = $shistory[$spos];
$top->addstr("\n") if $spos > 0;
setattr($line);