From f509c3ee22c280d78ca5c360ad476e72d6f78df0 Mon Sep 17 00:00:00 2001
From: Florent Le Coz <louiz@louiz.org>
Date: Sun, 17 Apr 2011 00:49:49 +0200
Subject: idem etc

---
 src/room.py | 3 ++-
 src/tabs.py | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/room.py b/src/room.py
index b0b86383..4bb6b8b1 100644
--- a/src/room.py
+++ b/src/room.py
@@ -66,7 +66,8 @@ class Room(TextBuffer):
                 highlight_words = config.get('highlight_on', '').split(':')
                 for word in highlight_words:
                     if word and word.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
                         break
         return color
diff --git a/src/tabs.py b/src/tabs.py
index 7f9e26f9..03fa0856 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -816,6 +816,7 @@ class MucTab(ChatTab):
             else:
                 self.on_user_change_status(room, user, from_nick, from_room, affiliation, role, show, status)
         if self.core.current_tab() is self:
+            self.text_win.refresh(self._room)
             self.user_win.refresh(self._room.users)
             self.info_header.refresh(self._room, self.text_win)
             self.input.refresh()
@@ -949,7 +950,6 @@ class MucTab(ChatTab):
                     status != user.status):
             # display the message in the room
             room.add_message(msg)
-            self.text_win.refresh(self._room)
         self.core.on_user_changed_status_in_private('%s/%s' % (from_room, from_nick), msg)
         # finally, effectively change the user status
         user.update(affiliation, show, status, role)
-- 
cgit v1.2.3