fix the LAST issue with the empty lines !!, seriously
This commit is contained in:
parent
9456f7fc35
commit
94d9d02e8f
2 changed files with 4 additions and 2 deletions
|
@ -90,7 +90,7 @@ class Room(object):
|
|||
for word in highlight_words:
|
||||
if word.lower() in txt.lower() and word != '':
|
||||
self.set_color_state(13)
|
||||
color = 3
|
||||
color = 2
|
||||
break
|
||||
self.messages.append(Message(txt, time, nickname, user, color))
|
||||
|
||||
|
|
|
@ -196,7 +196,9 @@ class TextWin(Win):
|
|||
txt[:limit], message.color,
|
||||
offset)
|
||||
lines.append(l)
|
||||
txt = txt[limit+1:]
|
||||
txt = txt[limit:]
|
||||
if txt.startswith('\n'):
|
||||
txt = txt[1:]
|
||||
first = False
|
||||
return lines[-len(messages):]# return only the needed number of lines
|
||||
|
||||
|
|
Loading…
Reference in a new issue