Only highlight the nick if it is not inside a word
thanks gio
This commit is contained in:
parent
04aa6c8914
commit
f58dfe26af
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue