This commit is contained in:
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 2010-07-26 17:56:22 +00:00
parent bee3b7c75c
commit 89b95c036f

View file

@ -284,12 +284,15 @@ class TextWin(Win):
def write_text(self, y, x, txt, color):
"""
return the number of line written, -1
write the text of a line.
"""
txt = txt.encode('utf-8')
if color:
self.win.attron(curses.color_pair(color))
try:
self.win.addstr(y, x, txt)
except: # bug 1665
pass
if color:
self.win.attroff(curses.color_pair(color))