ncplane_resize_internal(): no work necessary when old pos+size are the same #1588

pull/1589/head
nick black 3 years ago
parent 96981c8e75
commit 5fd6177c17
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -621,6 +621,10 @@ int ncplane_resize_internal(ncplane* n, int keepy, int keepx, int keepleny,
return -1;
}
loginfo(ncplane_notcurses_const(n), "%dx%d @ %d/%d → %d/%d @ %d/%d (keeping %dx%d from %d/%d)\n", rows, cols, n->absy, n->absx, ylen, xlen, n->absy + keepy + yoff, n->absx + keepx + xoff, keepleny, keeplenx, keepy, keepx);
if(n->absy == n->absy + keepy && n->absx == n->absx + keepx &&
rows == ylen && cols == xlen){
return 0;
}
notcurses* nc = ncplane_notcurses(n);
if(n->sprite){
sprixel_hide(n->sprite);

@ -159,7 +159,7 @@ paint_sprixel(ncplane* p, struct crender* rvec, int starty, int startx,
break;
}
struct crender* crender = &rvec[fbcellidx(absy, dstlenx, absx)];
//fprintf(stderr, "presprixel: %p preid: %d id: %d state: %d\n", rvec->sprixel, rvec->sprixel ? rvec->sprixel->id : 0, cell_sprixel_id(vis), sprixel_by_id(ncplane_notcurses_const(p), cell_sprixel_id(vis))->invalidated);
//fprintf(stderr, "presprixel: %p preid: %d id: %d state: %d\n", rvec->sprixel, rvec->sprixel ? rvec->sprixel->id : 0, cell_sprixel_id(vis), s->invalidated);
// if we already have a glyph solved (meaning said glyph is above this
// sprixel), and we run into a bitmap cell, we need to null that cell out
// of the bitmap.

Loading…
Cancel
Save