mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
[cli PoC] set scrolling on stdn #2196
This commit is contained in:
parent
508e143916
commit
717aaf9d5d
@ -1252,9 +1252,7 @@ rasterize_core(notcurses* nc, const ncpile* p, fbuf* f, unsigned phase){
|
||||
//fprintf(stderr, "damageidx: %ld\n", damageidx);
|
||||
}
|
||||
if(saw_linefeed){
|
||||
fprintf(stderr, "OH WE SAW THE LINEFEED (%d/%d)!\n", nc->rstate.logendy, nc->rstate.logendx);
|
||||
nc->rstate.logendx = 0;
|
||||
fprintf(stderr, "OH WE SAW THE LINEFEED (%d/%d)!\n", nc->rstate.logendy, nc->rstate.logendx);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -11,13 +11,24 @@ int main(void){
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
struct ncplane* stdn = notcurses_stdplane(nc);
|
||||
ncplane_putstr(stdn, "press any key\n");
|
||||
notcurses_render(nc);
|
||||
ncplane_set_scrolling(stdn, true);
|
||||
if(ncplane_putstr(stdn, "press any key\n") < 0){
|
||||
goto err;
|
||||
}
|
||||
if(notcurses_render(nc)){
|
||||
goto err;
|
||||
}
|
||||
ncinput ni;
|
||||
do{
|
||||
notcurses_get_blocking(nc, &ni);
|
||||
}while(ni.evtype == NCTYPE_RELEASE);
|
||||
notcurses_render(nc);
|
||||
if(notcurses_render(nc)){
|
||||
goto err;
|
||||
}
|
||||
notcurses_stop(nc);
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
err:
|
||||
notcurses_stop(nc);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user