--- iselect.pl 2007/10/25 14:11:42 7 +++ iselect.pl 2007/10/25 14:52:56 8 @@ -50,6 +50,7 @@ my $status_text = ''; my $error_text = ''; +my $status_lines = 3; # find which lines are selectable in input file my $selectable_line; @@ -90,7 +91,7 @@ } sub redraw { - for my $l (0 .. $scr->rows - 3) { + for my $l (0 .. $scr->rows - $status_lines) { my $line = $lines[ $l + $top_screen_line ]; redraw_line( $l, $line ); last if ($l == $#lines); @@ -102,10 +103,10 @@ my $pcnt = int(($pos || 0) * 100 / ($#lines || 1)); my $pos_txt = sprintf('%d, %d%% ',$pos,$pcnt); - $scr->at($scr->rows - 2,0)->reverse()->puts( + $scr->at($scr->rows - $status_lines + 1,0)->reverse()->puts( sprintf(' %-'.($scr->cols - length($pos_txt) - 2).'s ',$status_text) .$pos_txt)->normal(); - $scr->at($scr->rows - 1,0)->puts( + $scr->at($scr->rows - $status_lines + 2,0)->puts( sprintf('%-'.$scr->cols.'s', $error_text) ); } @@ -117,7 +118,7 @@ redraw_line( $screen_line, $lines[$pos] ); - my $last_screen_line = $scr->rows - 3; + my $last_screen_line = $scr->rows - $status_lines; if ( $d < 0 && $screen_line == 0 ) { if ( $pos > 0 ) { @@ -159,7 +160,7 @@ $error_text = ""; - my $lines_on_screen = $scr->rows - 3; + my $lines_on_screen = $scr->rows - $status_lines; if ($key eq 'ku') { selected( -1 );