changeset 5c7d35a996fa in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=5c7d35a996fa description: A bunch of fixes for the command completion
diffstat:
src/chat_control.py | 7 +++++-- src/groupchat_control.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-)
diffs (38 lines):
diff -r fa58ef7e5935 -r 5c7d35a996fa src/chat_control.py --- a/src/chat_control.py Thu Sep 17 13:25:25 2009 +0300 +++ b/src/chat_control.py Thu Sep 17 19:06:38 2009 +0300 @@ -164,10 +164,12 @@ text = buffer.get_text(start, end, False) text = text.decode('utf8')
+ splitted = text.split() + if (text.startswith(self.COMMAND_PREFIX) and not - text.startswith(self.COMMAND_PREFIX * 2)): + text.startswith(self.COMMAND_PREFIX * 2) and len(splitted) == 1):
- text = text.split()[0] + text = splitted[0] bare = text.lstrip(self.COMMAND_PREFIX)
if len(text) == 1: @@ -351,6 +353,7 @@ self.msg_textview.grab_focus()
self.command_hits = [] + self.last_key_tabs = False
def set_speller(self): # now set the one the user selected diff -r fa58ef7e5935 -r 5c7d35a996fa src/groupchat_control.py --- a/src/groupchat_control.py Thu Sep 17 13:25:25 2009 +0300 +++ b/src/groupchat_control.py Thu Sep 17 19:06:38 2009 +0300 @@ -1785,7 +1785,7 @@
# HACK: Not the best soltution. if (text.startswith(self.COMMAND_PREFIX) and not - text.startswith(self.COMMAND_PREFIX * 2)): + text.startswith(self.COMMAND_PREFIX * 2) and len(splitted_text) == 1): return super(GroupchatControl, self).handle_message_textview_mykey_press(widget, event_keyval, event_keymod)