summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-09-16 16:00:33 +0200
committerFlorent Le Coz <louiz@louiz.org>2011-09-16 16:00:33 +0200
commit489852a59379733df6b8902e57ce93f6f63d27e7 (patch)
tree78631d2459879838da408797f99167b67c09bc87
parentb33a09f0f6439fa8e9f7a4dbc38bf6f17465f641 (diff)
downloadpoezio-489852a59379733df6b8902e57ce93f6f63d27e7.tar.gz
poezio-489852a59379733df6b8902e57ce93f6f63d27e7.tar.bz2
poezio-489852a59379733df6b8902e57ce93f6f63d27e7.tar.xz
poezio-489852a59379733df6b8902e57ce93f6f63d27e7.zip
Fixes the new-message-separator (I think)
-rw-r--r--src/windows.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/windows.py b/src/windows.py
index 74d3b398..ef11107a 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -588,9 +588,7 @@ class TextWin(Win):
with g_lock:
self._win.erase()
for y, line in enumerate(lines):
- if line is None:
- self.write_line_separator()
- else:
+ if line:
msg = line.msg
if line.start_pos == 0:
if msg.nick_color:
@@ -606,8 +604,9 @@ class TextWin(Win):
self._win.attrset(0)
for y, line in enumerate(lines):
if not line:
- continue
- self.write_text(y, (3 if line.msg.nickname else 1) + len(line.msg.str_time)+len(truncate_nick(line.msg.nickname) or ''), line.msg.txt[line.start_pos:line.end_pos])
+ self.write_line_separator()
+ else:
+ self.write_text(y, (3 if line.msg.nickname else 1) + len(line.msg.str_time)+len(truncate_nick(line.msg.nickname) or ''), line.msg.txt[line.start_pos:line.end_pos])
if y != self.height-1:
self.addstr('\n')
self._win.attrset(0)