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:
|
for char in self.text:
|
||||||
if char == "\n":
|
if char == "\n":
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
line = char
|
|
||||||
length = 1
|
length = 1
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
@ -293,9 +292,11 @@ class MultilineText:
|
||||||
for char in self.text:
|
for char in self.text:
|
||||||
if char == "\n" or len(line) + 1 > self.max_width:
|
if char == "\n" or len(line) + 1 > self.max_width:
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
line = char
|
|
||||||
length = 1
|
length = 1
|
||||||
|
|
||||||
|
if not char == "\n":
|
||||||
|
line = char
|
||||||
|
|
||||||
else:
|
else:
|
||||||
line += char
|
line += char
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue