summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2012-12-15 19:51:07 +0100
committerFlorent Le Coz <louiz@louiz.org>2012-12-15 19:51:07 +0100
commit266ba884e50b550122fefb568888fb5d1f91fba7 (patch)
treec5010fe95763c09017aa10ed0aa1dd852b98a873 /src/core.py
parent4fe00ed0693340b4b76b563f6015120de25e2fe6 (diff)
downloadpoezio-266ba884e50b550122fefb568888fb5d1f91fba7.tar.gz
poezio-266ba884e50b550122fefb568888fb5d1f91fba7.tar.bz2
poezio-266ba884e50b550122fefb568888fb5d1f91fba7.tar.xz
poezio-266ba884e50b550122fefb568888fb5d1f91fba7.zip
Make /w command better.
fix #2185
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core.py b/src/core.py
index da0585a4..e74ecd01 100644
--- a/src/core.py
+++ b/src/core.py
@@ -1509,15 +1509,17 @@ class Core(object):
self.current_tab_nb = nb
else:
for tab in self.tabs:
- if nb in safeJID(tab.get_name()).user:
- self.current_tab_nb = tab.nb
+ for name in tab.matching_names():
+ if nb in name:
+ self.current_tab_nb = tab.nb
self.current_tab().on_gain_focus()
self.refresh_window()
def completion_win(self, the_input):
"""Completion for /win"""
- l = [safeJID(tab.get_name()).user for tab in self.tabs]
- l.remove('')
+ l = []
+ for tab in self.tabs:
+ l.extend(tab.matching_names())
return the_input.auto_completion(l, ' ', quotify=False)
def command_move_tab(self, arg):