summaryrefslogtreecommitdiff
path: root/src/text_buffer.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/text_buffer.py')
-rw-r--r--src/text_buffer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/text_buffer.py b/src/text_buffer.py
index 61c08994..e0d0fc1c 100644
--- a/src/text_buffer.py
+++ b/src/text_buffer.py
@@ -50,11 +50,15 @@ class TextBuffer(object):
self.messages.append(msg)
while len(self.messages) > self.messages_nb_limit:
self.messages.pop(0)
+ ret_val = None
for window in self.windows: # make the associated windows
# build the lines from the new message
nb = window.build_new_message(msg)
+ if ret_val is None:
+ ret_val = nb
if window.pos != 0:
window.scroll_up(nb)
+ return ret_val or 1
def del_window(self, win):
self.windows.remove(win)