summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-12 00:34:25 +0200
committermathieui <mathieui@mathieui.net>2014-04-12 00:34:25 +0200
commitf58dfe26af22495be56400dd91983bc46955c1bf (patch)
tree0036083332c335fedea65092eb59c8938ec61e2c /src
parent04aa6c89145dfc8aaa5c2e418e01419af9471726 (diff)
downloadpoezio-f58dfe26af22495be56400dd91983bc46955c1bf.tar.gz
poezio-f58dfe26af22495be56400dd91983bc46955c1bf.tar.bz2
poezio-f58dfe26af22495be56400dd91983bc46955c1bf.tar.xz
poezio-f58dfe26af22495be56400dd91983bc46955c1bf.zip
Only highlight the nick if it is not inside a word
thanks gio
Diffstat (limited to 'src')
-rw-r--r--src/tabs/muctab.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tabs/muctab.py b/src/tabs/muctab.py
index 4cd18f03..94cfbd3e 100644
--- a/src/tabs/muctab.py
+++ b/src/tabs/muctab.py
@@ -15,6 +15,7 @@ log = logging.getLogger(__name__)
import curses
import os
import random
+import re
from datetime import datetime
from functools import reduce
@@ -1158,7 +1159,8 @@ class MucTab(ChatTab):
"""
highlighted = False
if not time and nickname and nickname != self.own_nick and self.joined:
- if self.own_nick.lower() in txt.lower():
+
+ if re.search(r'\b' + self.own_nick.lower() + r'\b', txt.lower()):
if self.state != 'current':
self.state = 'highlight'
highlighted = True