little bugfix in command completion (thx dennis)

This commit is contained in:
Yann Leboulanger 2005-06-19 22:45:33 +00:00
parent d3293ef3cb
commit f279bcf8af
1 changed files with 5 additions and 3 deletions

View File

@ -408,9 +408,11 @@ class GroupchatWindow(chat.Chat):
for cmd in self.muc_cmds:
if cmd.startswith(text.lstrip('/')):
self.cmd_hits[room_jid].append(cmd)
message_buffer.delete(start_iter, end_iter)
message_buffer.insert_at_cursor('/' + self.cmd_hits[room_jid][0])
self.last_key_tabs[room_jid] = True
if len(self.cmd_hits[room_jid]):
message_buffer.delete(start_iter, end_iter)
message_buffer.insert_at_cursor('/' + \
self.cmd_hits[room_jid][0])
self.last_key_tabs[room_jid] = True
return True
# nick completion