From 9889baf0ce398131979f3531ac65a602dfd8e782 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 16 Apr 2011 18:07:14 +0200 Subject: Make the information messages "pop" the information buffer temporarly --- src/text_buffer.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/text_buffer.py') 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) -- cgit v1.2.3