From 5bbd5cd5efb149cef07f864ea2551601ff139463 Mon Sep 17 00:00:00 2001 From: anjakefala Date: Thu, 5 Oct 2023 14:04:21 -0700 Subject: [PATCH] [scr-] only clear screen if screen exists --- visidata/cliptext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/visidata/cliptext.py b/visidata/cliptext.py index c4e26b96a..296c186fb 100644 --- a/visidata/cliptext.py +++ b/visidata/cliptext.py @@ -199,7 +199,8 @@ def clipdraw_chunks(scr, y, x, chunks, attr, w=None, clear=True, rtl=False, lite if w and clear and not rtl: actualw = min(w, windowWidth-x-1) - scr.addstr(y, x, disp_column_fill*actualw, cattr.attr) # clear whole area before displaying + if scr: + scr.addstr(y, x, disp_column_fill*actualw, cattr.attr) # clear whole area before displaying try: for colorname, chunk in chunks: