summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-12-15 19:32:51 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-12-15 19:32:51 +0000
commit7401c8ba572e28d1f1a7ae159af055930e393167 (patch)
tree61de9651007bb819f279052c6690765027f48372 /src/tabs.py
parent289f5e65b83670b7c76f807f4499f260cb4c6c63 (diff)
downloadpoezio-7401c8ba572e28d1f1a7ae159af055930e393167.tar.gz
poezio-7401c8ba572e28d1f1a7ae159af055930e393167.tar.bz2
poezio-7401c8ba572e28d1f1a7ae159af055930e393167.tar.xz
poezio-7401c8ba572e28d1f1a7ae159af055930e393167.zip
do not complete our own nickname. fixed #2061
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 5e103c10..74696df5 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -528,8 +528,10 @@ class MucTab(ChatTab):
"""
if self.complete_commands(self.input):
return
+ # If we are not completing a command or a command's argument, complete a nick
compare_users = lambda x: x.last_talked
- word_list = [user.nick for user in sorted(self._room.users, key=compare_users, reverse=True)]
+ word_list = [user.nick for user in sorted(self._room.users, key=compare_users, reverse=True)\
+ if user.nick != self._room.own_nick]
after = config.get('after_completion', ',')+" "
if ' ' not in self.input.get_text() or (self.input.last_completion and\
self.input.get_text()[:-len(after)] == self.input.last_completion):