summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-11-08 02:39:48 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-11-08 02:41:19 +0100
commitcd0b2681e02865aa1820d0895c8eddc5036aba66 (patch)
tree6d2c836fd0b3ec32c4fbfcaf8b944d88b21af127 /src
parentb26c9e33af5da5ddf8956a7269cbe06be2ccea6a (diff)
downloadpoezio-cd0b2681e02865aa1820d0895c8eddc5036aba66.tar.gz
poezio-cd0b2681e02865aa1820d0895c8eddc5036aba66.tar.bz2
poezio-cd0b2681e02865aa1820d0895c8eddc5036aba66.tar.xz
poezio-cd0b2681e02865aa1820d0895c8eddc5036aba66.zip
Fix new messages separator when it is a the top of the text window
Diffstat (limited to 'src')
-rw-r--r--src/windows.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/windows.py b/src/windows.py
index 9fa3e705..c94de15e 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -634,7 +634,7 @@ class TextWin(Win):
self._win.attrset(0)
for y, line in enumerate(lines):
if not line:
- self.write_line_separator()
+ self.write_line_separator(y)
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:
@@ -642,8 +642,8 @@ class TextWin(Win):
self._win.attrset(0)
self._refresh()
- def write_line_separator(self):
- self.addnstr('- '*(self.width//2-1)+'-', self.width, to_curses_attr(get_theme().COLOR_NEW_TEXT_SEPARATOR))
+ def write_line_separator(self, y):
+ self.addnstr(y, 0, '- '*(self.width//2-1)+'-', self.width, to_curses_attr(get_theme().COLOR_NEW_TEXT_SEPARATOR))
def write_text(self, y, x, txt):
"""