From b7901d99e4f77c5f5dc42e813e6959e8ccd35d09 Mon Sep 17 00:00:00 2001 From: Saul Pwanson Date: Sun, 26 Nov 2023 23:47:18 -0800 Subject: [PATCH] [cliptext-] do not crash with x<0 #2138 --- visidata/cliptext.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/visidata/cliptext.py b/visidata/cliptext.py index 4a481a38f..36f4ab44f 100644 --- a/visidata/cliptext.py +++ b/visidata/cliptext.py @@ -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