summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-12-26 21:44:49 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-12-26 21:44:49 +0000
commit9f4474be20ec73e9722da1d7f66c1c3dd3f52c22 (patch)
tree113975661009f271356f9e57270cde60bc6ef115 /src
parentcdb8128d321c16bf526afdbd7d790fc6189239b3 (diff)
downloadpoezio-9f4474be20ec73e9722da1d7f66c1c3dd3f52c22.tar.gz
poezio-9f4474be20ec73e9722da1d7f66c1c3dd3f52c22.tar.bz2
poezio-9f4474be20ec73e9722da1d7f66c1c3dd3f52c22.tar.xz
poezio-9f4474be20ec73e9722da1d7f66c1c3dd3f52c22.zip
fixed #2072, fix TextWin refresh
Diffstat (limited to 'src')
-rw-r--r--src/windows.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/windows.py b/src/windows.py
index 7161b0dd..0ad7834c 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -513,12 +513,12 @@ class TextWin(Win):
for y, line in enumerate(lines):
if line is None:
self.write_line_separator()
- continue
- if line.time:
- self.write_time(line.time)
- if line.nickname:
- self.write_nickname(line.nickname, line.nickname_color)
- self.write_text(y, line.text_offset, line.text, line.text_color, line.colorized)
+ else:
+ if line.time:
+ self.write_time(line.time)
+ if line.nickname:
+ self.write_nickname(line.nickname, line.nickname_color)
+ self.write_text(y, line.text_offset, line.text, line.text_color, line.colorized)
if y != self.height - 1:
self.addstr('\n')
self._refresh()
@@ -526,10 +526,7 @@ class TextWin(Win):
def write_line_separator(self):
"""
"""
- self._win.attron(curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR))
- self.addnstr('- '*(self.width//2), self.width)
- self._win.attroff(curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR))
- self.addstr('\n')
+ self.addnstr('- '*(self.width//2-1)+'-', self.width, curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR))
def write_text(self, y, x, txt, color, colorized):
"""