From c33ee919ffd68c136142405275fa587cb396ce49 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 10 Mar 2013 22:58:42 +0100 Subject: Fix #2241 --- src/core.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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""" -- cgit v1.2.3