Do not complete fulljids in /message (Fix #3405)
This commit is contained in:
parent
7fd672caca
commit
3cb8e33f93
2 changed files with 11 additions and 12 deletions
|
@ -256,16 +256,15 @@ class CompletionCore:
|
||||||
n = the_input.get_argument_position(quoted=True)
|
n = the_input.get_argument_position(quoted=True)
|
||||||
if n >= 2:
|
if n >= 2:
|
||||||
return False
|
return False
|
||||||
l = []
|
online = []
|
||||||
for jid in roster.jids():
|
offline = []
|
||||||
if len(roster[jid]):
|
for jid in sorted(roster.jids()):
|
||||||
l.append(jid)
|
if len(roster[jid]) > 0:
|
||||||
for resource in roster[jid].resources:
|
online.append(jid)
|
||||||
l.append(resource.jid)
|
else:
|
||||||
for jid in roster.jids():
|
offline.append(jid)
|
||||||
if not len(roster[jid]):
|
return Completion(
|
||||||
l.append(jid)
|
the_input.new_completion, online + offline, 1, '', quotify=True)
|
||||||
return Completion(the_input.new_completion, l, 1, '', quotify=True)
|
|
||||||
|
|
||||||
def invite(self, the_input):
|
def invite(self, the_input):
|
||||||
"""Completion for /invite"""
|
"""Completion for /invite"""
|
||||||
|
|
|
@ -1099,8 +1099,8 @@ class Core:
|
||||||
|
|
||||||
for state in states:
|
for state in states:
|
||||||
for tab in tab_refs[state]:
|
for tab in tab_refs[state]:
|
||||||
if (tab.nb < self.tabs.current_index and
|
if (tab.nb < self.tabs.current_index
|
||||||
tab_refs[state][-1].nb > self.tabs.current_index):
|
and tab_refs[state][-1].nb > self.tabs.current_index):
|
||||||
continue
|
continue
|
||||||
self.command.win(str(tab.nb))
|
self.command.win(str(tab.nb))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue