Skip to content

Commit

Permalink
[cliptext-] do not crash with x<0 #2138
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Nov 27, 2023
1 parent b9f6523 commit b7901d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions visidata/cliptext.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ def clipdraw(scr, y, x, s, attr, w=None, clear=True, literal=False, **kwargs):
else:
chunks = [(dict(link='', cattr=ColorAttr()), s)]

x = max(0, x)
y = max(0, y)
assert x >= 0, x
assert y >= 0, y

Expand Down

0 comments on commit b7901d9

Please # to comment.