summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-30 10:30:46 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-30 10:30:46 +0000
commit450c234cd3c21032fe7dd10f754fbda0855ef2ac (patch)
treebcbd2d838b24c3a170fea43a7eec4064a911ffb6
parentdc39cdab50f8fc2df9683bb26a3eafc3a3675f56 (diff)
downloadpoezio-450c234cd3c21032fe7dd10f754fbda0855ef2ac.tar.gz
poezio-450c234cd3c21032fe7dd10f754fbda0855ef2ac.tar.bz2
poezio-450c234cd3c21032fe7dd10f754fbda0855ef2ac.tar.xz
poezio-450c234cd3c21032fe7dd10f754fbda0855ef2ac.zip
break words even on the last line
-rw-r--r--src/window.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/window.py b/src/window.py
index 87014cfd..2ee52b5e 100644
--- a/src/window.py
+++ b/src/window.py
@@ -216,8 +216,8 @@ class TextWin(Win):
limit = txt[:self.width-offset].find('\n')
else:
# break between words if possible
- if len(txt) >= self.width:
- limit = txt[:self.width-offset-1].rfind(' ')
+ if len(txt) >= self.width-offset:
+ limit = txt[:self.width-offset].rfind(' ')
this_line_was_broken_by_space = True
if limit <= 0:
limit = self.width-offset-1