Skip to content

Commit

Permalink
[scr-] only clear screen if screen exists
Browse files Browse the repository at this point in the history
  • Loading branch information
anjakefala committed Oct 5, 2023
1 parent 8accaba commit 5bbd5cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion visidata/cliptext.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5bbd5cd

Please sign in to comment.