From 832451a966b70b1b9e372cbc603ef94375c20203 Mon Sep 17 00:00:00 2001 From: nick black Date: Tue, 4 Feb 2020 22:33:10 -0500 Subject: [PATCH] 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. --- src/view/view.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/view/view.cpp b/src/view/view.cpp index 810908cff..f1b381ab7 100644 --- a/src/view/view.cpp +++ b/src/view/view.cpp @@ -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){