[ncdirect] postition cursor after blitting image #2059

pull/2139/head
nick black 3 years ago committed by nick black
parent 6ba5a98a7c
commit 429485551a

@ -525,12 +525,11 @@ ncdirect_dump_plane(ncdirect* n, const ncplane* np, int xoff){
if(fbuf_init(&f)){
return -1;
}
// FIXME figure out how tall it is, and ensure we have sufficient room via scrolling
if(cursor_yx_get(n->tcache.ttyfd, u7, &y, NULL)){
return -1;
}
if(toty - dimy < y){
int scrolls = y;
int scrolls = y - 1;
y = toty - dimy;
if(y < 0){
y = 0;
@ -568,6 +567,13 @@ ncdirect_dump_plane(ncdirect* n, const ncplane* np, int xoff){
return -1;
}
}
int targy = y + dimy;
if(targy > toty){
targy = toty;
}
if(ncdirect_cursor_move_yx(n, targy, xoff)){
return -1;
}
return 0;
}
//fprintf(stderr, "rasterizing %dx%d+%d\n", dimy, dimx, xoff);

Loading…
Cancel
Save