mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
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.
This commit is contained in:
parent
443deee7a3
commit
832451a966
@ -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…
Reference in New Issue
Block a user