Refactor command_win a bit
This commit is contained in:
parent
54a43ab132
commit
22cd80feb5
1 changed files with 4 additions and 4 deletions
|
@ -1621,14 +1621,14 @@ class Core(object):
|
|||
"""
|
||||
/win <number>
|
||||
"""
|
||||
args = arg.split()
|
||||
if len(args) != 1:
|
||||
arg = arg.strip()
|
||||
if not arg:
|
||||
self.command_help('win')
|
||||
return
|
||||
try:
|
||||
nb = int(args[0])
|
||||
nb = int(arg.split()[0])
|
||||
except ValueError:
|
||||
nb = arg.strip()
|
||||
nb = arg
|
||||
if self.current_tab().nb == nb:
|
||||
return
|
||||
self.previous_tab_nb = self.current_tab().nb
|
||||
|
|
Loading…
Reference in a new issue