summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/room.py5
-rw-r--r--src/windows.py6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/room.py b/src/room.py
index 4bb6b8b1..3ff655fb 100644
--- a/src/room.py
+++ b/src/room.py
@@ -60,7 +60,8 @@ class Room(TextBuffer):
color = None
if not time and nickname and nickname != self.own_nick and self.joined:
if self.own_nick.lower() in txt.lower():
- self.set_color_state(theme.COLOR_TAB_HIGHLIGHT)
+ if self.color_state != theme.COLOR_TAB_CURRENT:
+ self.set_color_state(theme.COLOR_TAB_HIGHLIGHT)
color = theme.COLOR_HIGHLIGHT_NICK
else:
highlight_words = config.get('highlight_on', '').split(':')
@@ -105,7 +106,7 @@ class Room(TextBuffer):
self.color_state != theme.COLOR_TAB_CURRENT:
if self.color_state != theme.COLOR_TAB_HIGHLIGHT:
self.set_color_state(theme.COLOR_TAB_NEW_MESSAGE)
- nick_color = nick_color or user.color if user else None
+ nick_color = nick_color or None
if not nickname or time:
txt = '\x195%s' % (txt,)
else: # TODO
diff --git a/src/windows.py b/src/windows.py
index 53cd0781..ea4bfca2 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -576,10 +576,10 @@ class TextWin(Win):
while txt != '':
(txt, cutted_txt) = cut_text(txt, self.width-offset-1)
if first:
- if message.user:
- color = message.user.color
- elif message.nick_color:
+ if message.nick_color:
color = message.nick_color
+ elif message.user:
+ color = message.user.color
else:
color = None
else: