notcurses-view: erase base plane each frame #314

On a resize, notcurses-view left cruft in the middle of the
top line due to the frame/time being moved. An erase is awfully
heavyweight here, in the abstract, but it gets the job done
simply, and doesn't seem to have much performance impact.
pull/319/head
nick black 4 years ago
parent 443deee7a3
commit 832451a966
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -56,6 +56,7 @@ int perframe([[maybe_unused]] struct notcurses* _nc, struct ncvisual* ncv, void*
struct timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
int64_t ns = timespec_to_ns(&now) - timespec_to_ns(start);
stdn->erase();
stdn->printf(0, NCAlign::Left, "frame %06d\u2026", *framecount);
char* subtitle = ncvisual_subtitle(ncv);
if(subtitle){

Loading…
Cancel
Save