X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fconsole.pl;h=8af9f3b3aed640fb6500efa34d1c471a1f192b38;hb=fa9e414f691e4e9a80c80eb54cb7b1e971976b22;hp=fd033d90d66cb704d9efcb939344bbeac5522ab0;hpb=b672afe940f843351af2bc4a87b4c4239f3a5140;p=spider.git diff --git a/perl/console.pl b/perl/console.pl index fd033d90..8af9f3b3 100755 --- a/perl/console.pl +++ b/perl/console.pl @@ -85,11 +85,13 @@ sub do_initscr $top = $scr->subwin($lines-4, $cols, 0, 0); $top->intrflush(0); $top->scrollok(1); + $top->idlok(1); $top->meta(1); # $scr->addstr($lines-4, 0, '-' x $cols); $bot = $scr->subwin(3, $cols, $lines-3, 0); $bot->intrflush(0); $bot->scrollok(1); + $top->idlok(1); $bot->keypad(1); $bot->move(1,0); $bot->meta(1); @@ -106,7 +108,8 @@ sub do_resize initscr(); raw(); noecho(); - $lines = LINES; + nonl(); + $lines = LINES; $cols = COLS; $has_colors = has_colors(); do_initscr(); @@ -168,6 +171,7 @@ sub show_screen $top->addstr("\n") if $spos > 0; setattr($line); $top->addstr($line); +# $top->addstr("\n"); $top->attrset(COLOR_PAIR(0)) if $has_colors; $spos = @shistory; @@ -190,8 +194,9 @@ sub show_screen my $line = $shistory[$p]; my $lines = measure($line); last if $i + $lines > $pagel; + $top->addstr("\n") if $i; setattr($line); - $top->addstr($i, 0, "$line\n"); + $top->addstr($line); $top->attrset(COLOR_PAIR(0)) if $has_colors; $i += $lines; }