diff --git a/pg.py b/pg.py index 71ddfbd..3db3a17 100644 --- a/pg.py +++ b/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