Fix #3338 (cycle tabs with /w foo instead of picking the first)

This commit is contained in:
mathieui 2017-10-11 23:34:32 +02:00
parent 88903095c7
commit 9a7c2c2136

View file

@ -210,7 +210,10 @@ class CommandCore:
self.core.current_tab_nb = number self.core.current_tab_nb = number
else: else:
matchs = [] matchs = []
for tab in self.core.tabs: target_tabs = self.core.tabs[self.core.current_tab_nb+1:]
if not target_tabs:
target_tabs = self.core.tabs
for tab in target_tabs:
for tab_name in tab.matching_names(): for tab_name in tab.matching_names():
if tab_name[1] and name in tab_name[1].lower(): if tab_name[1] and name in tab_name[1].lower():
matchs.append((tab_name[0], tab)) matchs.append((tab_name[0], tab))