From 450c234cd3c21032fe7dd10f754fbda0855ef2ac Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Wed, 30 Jun 2010 10:30:46 +0000 Subject: [PATCH] break words even on the last line --- src/window.py | 4 ++-- 1 file 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