make sure empty text returns 0 lines

pull/35051/head
Cameron Clough 4 months ago
parent 3c15e842d3
commit 618803fcc4
  1. 3
      system/ui/text.py

@ -21,7 +21,8 @@ def wrap_text(text, font_size, max_width):
for paragraph in text.split("\n"):
if not paragraph.strip():
lines.append("")
if lines:
lines.append("")
continue
indent = re.match(r"^\s*", paragraph).group()
current_line = indent

Loading…
Cancel
Save