bitmaps: never allow the last row to be used #1571

pull/1573/head
nick black 3 years ago
parent 41d129c1d2
commit d1a01e8fe8
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -96,6 +96,9 @@ orcaride(struct notcurses* nc, struct ncplane* on){
if(ox >= (dimx - odimx) / 4){
ox -= (dimx - odimx) / 4;
}
if(ox < 1){
ox = 1;
}
if(ncplane_move_yx(on, oy, ox)){
return -1;
}

@ -625,9 +625,10 @@ ncplane* ncvisual_render_pixels(notcurses* nc, ncvisual* ncv, const struct blits
if(scaling != NCSCALE_NONE && scaling != NCSCALE_NONE_HIRES){
notcurses_term_dim_yx(nc, &disprows, &dispcols);
if(!(flags & NCVISUAL_OPTION_VERALIGNED)){
// some terminals scroll when bitmaps hit the last line
disprows -= (placey + 1);
disprows -= placey;
}
// some terminals scroll when bitmaps hit the last line
--disprows;
dispcols *= nc->tcache.cellpixx;
disprows *= nc->tcache.cellpixy;
clamp_to_sixelmax(&nc->tcache, &disprows, &dispcols);

Loading…
Cancel
Save