Fixed another bug in MultilineText.

This commit is contained in:
The Wobbler 2024-03-22 20:54:30 +01:00
parent 7a2cd3e984
commit 3aa6cd9904

5
pg.py
View file

@ -281,7 +281,6 @@ class MultilineText:
for char in self.text:
if char == "\n":
lines.append(line)
line = char
length = 1
else:
@ -293,9 +292,11 @@ class MultilineText:
for char in self.text:
if char == "\n" or len(line) + 1 > self.max_width:
lines.append(line)
line = char
length = 1
if not char == "\n":
line = char
else:
line += char