Fixed another bug in MultilineText.
This commit is contained in:
parent
7a2cd3e984
commit
3aa6cd9904
1 changed files with 3 additions and 2 deletions
5
pg.py
5
pg.py
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue