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>
|
/win <number>
|
||||||
"""
|
"""
|
||||||
args = arg.split()
|
arg = arg.strip()
|
||||||
if len(args) != 1:
|
if not arg:
|
||||||
self.command_help('win')
|
self.command_help('win')
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
nb = int(args[0])
|
nb = int(arg.split()[0])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
nb = arg.strip()
|
nb = arg
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue