From 22cd80feb52d539e8aef5a252c75f75cf1f04c5b Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 18 Apr 2012 00:10:10 +0200 Subject: Refactor command_win a bit --- src/core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core.py') diff --git a/src/core.py b/src/core.py index c36531c0..13eea3e1 100644 --- a/src/core.py +++ b/src/core.py @@ -1621,14 +1621,14 @@ class Core(object): """ /win """ - 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 -- cgit v1.2.3