diff options
author | mathieui <mathieui@mathieui.net> | 2017-10-11 23:34:32 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2017-10-11 23:34:32 +0200 |
commit | 9a7c2c2136e8f928c218456d432b5d367f2c1aa0 (patch) | |
tree | b903c7064cb1dc4016218dcedc52134c3d6e0f3e | |
parent | 88903095c71b304ffee8d823ea071abb247a77b9 (diff) | |
download | poezio-9a7c2c2136e8f928c218456d432b5d367f2c1aa0.tar.gz poezio-9a7c2c2136e8f928c218456d432b5d367f2c1aa0.tar.bz2 poezio-9a7c2c2136e8f928c218456d432b5d367f2c1aa0.tar.xz poezio-9a7c2c2136e8f928c218456d432b5d367f2c1aa0.zip |
Fix #3338 (cycle tabs with /w foo instead of picking the first)
-rw-r--r-- | poezio/core/commands.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py index 7b4d0c10..31e6d8a1 100644 --- a/poezio/core/commands.py +++ b/poezio/core/commands.py @@ -210,7 +210,10 @@ class CommandCore: self.core.current_tab_nb = number else: 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(): if tab_name[1] and name in tab_name[1].lower(): matchs.append((tab_name[0], tab)) |