Commit 61548724 authored by louiz’'s avatar louiz’

/win's arg can be a part of the tab's name

parent b1996693
...@@ -1009,20 +1009,23 @@ class Core(object): ...@@ -1009,20 +1009,23 @@ class Core(object):
try: try:
nb = int(args[0]) nb = int(args[0])
except ValueError: except ValueError:
self.command_help('win') nb = arg.strip()
if self.current_tab().nb == nb: if self.current_tab().nb == nb:
return return
self.previous_tab_nb = self.current_tab().nb self.previous_tab_nb = self.current_tab().nb
self.current_tab().on_lose_focus() self.current_tab().on_lose_focus()
start = self.current_tab() start = self.current_tab()
self.tabs.append(self.tabs.pop(0)) self.tabs.append(self.tabs.pop(0))
if isinstance(nb, int):
while self.current_tab().nb != nb: while self.current_tab().nb != nb:
self.tabs.append(self.tabs.pop(0)) self.tabs.append(self.tabs.pop(0))
if self.current_tab() == start: if self.current_tab() == start:
self.current_tab().set_color_state(theme.COLOR_TAB_CURRENT) break
self.refresh_window() else:
return while nb not in JID(self.current_tab().get_name()).user:
if self.current_tab() is start:
self.current_tab().on_gain_focus() self.current_tab().on_gain_focus()
self.refresh_window() self.refresh_window()
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment