fix last_words_completion

This commit is contained in:
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 2010-11-27 02:41:45 +00:00
parent 956a33f0d0
commit 69e335c0ad

View file

@ -271,9 +271,10 @@ class ChatTab(Tab):
for msg in self._room.messages[:-40:-1]: for msg in self._room.messages[:-40:-1]:
if not msg: if not msg:
continue continue
txt = msg.txt
for char in char_we_dont_want: for char in char_we_dont_want:
msg.txt = msg.txt.replace(char, ' ') txt = txt.replace(char, ' ')
for word in msg.txt.split(): for word in txt.split():
if len(word) >= 4 and word not in words: if len(word) >= 4 and word not in words:
words.append(word) words.append(word)
self.input.auto_completion(words, ' ') self.input.auto_completion(words, ' ')