From ef7f8909fc2d88becdc214dea91c7b85920e0732 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 9 Apr 2005 07:24:52 +0000 Subject: [PATCH] bugfix in autocompletion of nicks in gc with comments --- plugins/gtkgui/groupchat_window.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/gtkgui/groupchat_window.py b/plugins/gtkgui/groupchat_window.py index 62c9f923b..abc96cc0f 100644 --- a/plugins/gtkgui/groupchat_window.py +++ b/plugins/gtkgui/groupchat_window.py @@ -282,10 +282,10 @@ class Groupchat_window(Chat): if not text: return False splitted_text = text.split() - begin = splitted_text[-1] #how is this the begin? This is the end! NO? + begin = splitted_text[-1] # begining of the latest word we typed for nick in list_nick: - if nick.find(begin) != -1: - if len(splitted_text) == 1: + if nick.find(begin) == 0: # the word is the begining of a nick + if len(splitted_text) == 1: # This is the 1st word of the line ? add = ': ' else: add = ' '