[notcurses_refresh] properly flush clear before completing raster #1948

This commit is contained in:
nick black 2021-11-03 23:47:48 -04:00
parent a9ed0a1092
commit 28001d5566
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 3 additions and 2 deletions

View File

@ -1363,6 +1363,9 @@ int notcurses_refresh(notcurses* nc, int* restrict dimy, int* restrict dimx){
if(clear_and_home(nc, &nc->tcache, &nc->rstate.f)){ if(clear_and_home(nc, &nc->tcache, &nc->rstate.f)){
return -1; return -1;
} }
if(fbuf_flush(&nc->rstate.f, nc->ttyfp)){
return -1;
}
if(nc->lfdimx == 0 || nc->lfdimy == 0){ if(nc->lfdimx == 0 || nc->lfdimy == 0){
return 0; return 0;
} }

View File

@ -422,9 +422,7 @@ int rendered_mode_player_inner(NotCurses& nc, int argc, char** argv,
}else if(ni.id == 'q'){ }else if(ni.id == 'q'){
return 0; return 0;
}else if(ni.id == 'L'){ }else if(ni.id == 'L'){
--i;
nc.refresh(nullptr, nullptr); nc.refresh(nullptr, nullptr);
break;
}else if(ni.id >= '0' && ni.id <= '6'){ }else if(ni.id >= '0' && ni.id <= '6'){
blitter = vopts.blitter = static_cast<ncblitter_e>(ni.id - '0'); blitter = vopts.blitter = static_cast<ncblitter_e>(ni.id - '0');
--i; // rerun same input with the new blitter --i; // rerun same input with the new blitter