Skip to content

Commit

Permalink
[input-] only draw prompt if scr is set
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Jun 29, 2023
1 parent e33e752 commit 09592d1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions visidata/_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 09592d1

Please sign in to comment.