fixed #1665
This commit is contained in:
parent
bee3b7c75c
commit
89b95c036f
1 changed files with 5 additions and 2 deletions
|
@ -284,12 +284,15 @@ class TextWin(Win):
|
||||||
|
|
||||||
def write_text(self, y, x, txt, color):
|
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')
|
txt = txt.encode('utf-8')
|
||||||
if color:
|
if color:
|
||||||
self.win.attron(curses.color_pair(color))
|
self.win.attron(curses.color_pair(color))
|
||||||
self.win.addstr(y, x, txt)
|
try:
|
||||||
|
self.win.addstr(y, x, txt)
|
||||||
|
except: # bug 1665
|
||||||
|
pass
|
||||||
if color:
|
if color:
|
||||||
self.win.attroff(curses.color_pair(color))
|
self.win.attroff(curses.color_pair(color))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue