From 09592d1f1614c32a22d01faf10875d346c9053b7 Mon Sep 17 00:00:00 2001 From: Saul Pwanson Date: Wed, 28 Jun 2023 23:17:54 -0700 Subject: [PATCH] [input-] only draw prompt if scr is set --- visidata/_input.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/visidata/_input.py b/visidata/_input.py index f28b56893..47338cb07 100644 --- a/visidata/_input.py +++ b/visidata/_input.py @@ -383,11 +383,12 @@ def _throw(v, i): cur_input_key = keys[0] while True: - vd.drawSheet(sheet._scr, sheet) + if sheet._scr: + vd.drawSheet(sheet._scr, sheet) - for k, v in kwargs.items(): - promptlen = clipdraw(sheet._scr, y-v.get('dy'), 0, v.get('prompt'), attr) - promptlen = clipdraw(sheet._scr, y-v.get('dy'), promptlen, v.get('value'), attr, w=sheet.windowWidth-1) + for k, v in kwargs.items(): + promptlen = clipdraw(sheet._scr, y-v.get('dy'), 0, v.get('prompt'), attr) + promptlen = clipdraw(sheet._scr, y-v.get('dy'), promptlen, v.get('value'), attr, w=sheet.windowWidth-1) try: input_kwargs = kwargs[cur_input_key]