mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
run the logend{yx} state machine in raster #1906
This commit is contained in:
parent
f9c8102e37
commit
0c484e4e02
@ -748,6 +748,12 @@ goto_location(notcurses* nc, FILE* out, int y, int x){
|
||||
}
|
||||
nc->rstate.x = x;
|
||||
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;
|
||||
}
|
||||
|
||||
@ -905,6 +911,13 @@ clean_sprixels(notcurses* nc, ncpile* p, FILE* out){
|
||||
static int
|
||||
rasterize_scrolls(ncpile* p, FILE* out){
|
||||
//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){
|
||||
if(ncfputc('\v', out) < 0){
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user