summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-12-22 01:03:55 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-12-22 01:03:55 +0000
commit133cda19128b80cf52bcf3c9b16c467d30a56c7c (patch)
tree0ecd3bfdfbd8bd250309bcb6838dddaf7c8e5374 /src/windows.py
parentcb9ec92655ba41e2a14bdfd8bb929da559805aaa (diff)
downloadpoezio-133cda19128b80cf52bcf3c9b16c467d30a56c7c.tar.gz
poezio-133cda19128b80cf52bcf3c9b16c467d30a56c7c.tar.bz2
poezio-133cda19128b80cf52bcf3c9b16c467d30a56c7c.tar.xz
poezio-133cda19128b80cf52bcf3c9b16c467d30a56c7c.zip
fix a traceback
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/windows.py b/src/windows.py
index 3543a171..a7cee054 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -501,7 +501,7 @@ class TextWin(Win):
Build the Line objects from the messages, and then write
them in the text area
"""
- if self.height <= 0:
+ if self.height <= 0 or not self.built_lines:
return
if self.pos != 0:
lines = self.built_lines[-self.height-self.pos:-self.pos]
@@ -570,7 +570,7 @@ class TextWin(Win):
self.addstr(word[1:-1], curses.color_pair(theme.COLOR_BRACKETED_WORD))
else:
self.addstr(word, curses.color_pair(color))
- self._win.addch(' ')
+ self.addstr(' ')
def write_nickname(self, nickname, color):
"""