単純なループの内容を再描画しようとしています。stdscr
これまでのところ、 100行に出力され、scrl
n行をスクロールするために使用すると、n個の空白行が表示されます。
私が欲しいのは、シーケンスを維持することです。stdscr
ただし、 n本の余分な行を使用してを再描画する方法がわかりません。どんなアイデアでも喜ばれます!
#include <ncurses.h>
int main(void)
{
initscr();
int maxy,maxx,y;
getmaxyx(stdscr,maxy,maxx);
scrollok(stdscr,TRUE);
for(y=0;y<=100;y++)
mvprintw(y,0,"This is some text written to line %d.",y);
refresh();
getch();
scrl(5);
refresh();
getch();
endwin();
return(0);
}