Skip to content

Commit

Permalink
[cliptext-] do not crash with miniscule widths #2138
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Nov 27, 2023
1 parent b7901d9 commit af8c4bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions visidata/cliptext.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ def wraptext(text, width=80, indent=''):
'''
import re

if width <= 0:
return

for line in text.splitlines():
if not line:
yield '', ''
Expand Down

0 comments on commit af8c4bf

Please # to comment.