Follow-up to f858d94, only reinitialize screen when toggling debug mode

The screen_init() call for each print() & C:o caused serious screen
artefacts in debug mode.  This patch reworks f858d94 to only re-init
screen when toggling debug.

Also, avoid screen_init() completely if started in debug mode.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2018-01-23 09:33:24 +01:00
1 parent ddf1bce642
commit 3d20237959
3 files changed
+13 -10

No files matched your search

-7
View File
@@ -110,13 +110,6 @@ void print(int action, const char *fmt, ...)
if (log_is_silent())
return;
/*
* In debug mode we must reinitialize often, user may be
* resizing their terminal to cope with debug output.
*/
if (log_is_debug())
screen_init();
if (fmt) {
va_start(ap, fmt);
printv(fmt, ap);