break words even on the last line
This commit is contained in:
parent
dc39cdab50
commit
450c234cd3
1 changed files with 2 additions and 2 deletions
|
@ -216,8 +216,8 @@ class TextWin(Win):
|
||||||
limit = txt[:self.width-offset].find('\n')
|
limit = txt[:self.width-offset].find('\n')
|
||||||
else:
|
else:
|
||||||
# break between words if possible
|
# break between words if possible
|
||||||
if len(txt) >= self.width:
|
if len(txt) >= self.width-offset:
|
||||||
limit = txt[:self.width-offset-1].rfind(' ')
|
limit = txt[:self.width-offset].rfind(' ')
|
||||||
this_line_was_broken_by_space = True
|
this_line_was_broken_by_space = True
|
||||||
if limit <= 0:
|
if limit <= 0:
|
||||||
limit = self.width-offset-1
|
limit = self.width-offset-1
|
||||||
|
|
Loading…
Reference in a new issue