summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-03-10 22:58:42 +0100
committermathieui <mathieui@mathieui.net>2013-03-10 22:58:42 +0100
commitc33ee919ffd68c136142405275fa587cb396ce49 (patch)
tree03a64822e28dd2d4c9a46428ed6d161eace3f09d /src
parentd87834760f6e512fe4c69fbe612a97a5242e8955 (diff)
downloadpoezio-c33ee919ffd68c136142405275fa587cb396ce49.tar.gz
poezio-c33ee919ffd68c136142405275fa587cb396ce49.tar.bz2
poezio-c33ee919ffd68c136142405275fa587cb396ce49.tar.xz
poezio-c33ee919ffd68c136142405275fa587cb396ce49.zip
Fix #2241
Diffstat (limited to 'src')
-rw-r--r--src/core.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core.py b/src/core.py
index db8c257a..8dd1b739 100644
--- a/src/core.py
+++ b/src/core.py
@@ -2333,8 +2333,11 @@ class Core(object):
if n > 2 or (n == 2 and the_input.get_text().endswith(' ')):
return
comp = reduce(lambda x, y: x + [i for i in y], (jid.resources for jid in roster if len(jid)), [])
- comp = (str(res.jid) for res in comp)
- return the_input.auto_completion(sorted(comp), '', quotify=True)
+ comp = sorted((str(res.jid) for res in comp))
+ bares = sorted(contact.bare_jid for contact in roster if len(contact))
+ off = sorted(contact.bare_jid for contact in roster if not len(contact))
+ comp = bares + comp + off
+ return the_input.auto_completion(comp, '', quotify=True)
def command_xml_tab(self, arg=''):
"""/xml_tab"""