run the logend{yx} state machine in raster #1906

pull/1920/head
nick black 3 years ago committed by nick black
parent f9c8102e37
commit 0c484e4e02

@ -748,6 +748,12 @@ goto_location(notcurses* nc, FILE* out, int y, int x){
} }
nc->rstate.x = x; nc->rstate.x = x;
nc->rstate.y = y; nc->rstate.y = y;
if(nc->rstate.logendy >= 0){
if(y > nc->rstate.logendy || (y == nc->rstate.logendy && x > nc->rstate.logendx)){
nc->rstate.logendy = y;
nc->rstate.logendx = x;
}
}
return ret; return ret;
} }
@ -905,6 +911,13 @@ clean_sprixels(notcurses* nc, ncpile* p, FILE* out){
static int static int
rasterize_scrolls(ncpile* p, FILE* out){ rasterize_scrolls(ncpile* p, FILE* out){
//fprintf(stderr, "%d tardies to work off, by far the most in the class\n", p->scrolls); //fprintf(stderr, "%d tardies to work off, by far the most in the class\n", p->scrolls);
if(p->nc->rstate.logendy >= 0){
p->nc->rstate.logendy -= p->scrolls;
if(p->nc->rstate.logendy < 0){
p->nc->rstate.logendy = 0;
p->nc->rstate.logendx = 0;
}
}
while(p->scrolls){ while(p->scrolls){
if(ncfputc('\v', out) < 0){ if(ncfputc('\v', out) < 0){
return -1; return -1;

Loading…
Cancel
Save