From ce5d67d8f621a1c42d438a65afbf53dba4c6966b Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 5 Apr 2011 20:51:35 +0200 Subject: =?UTF-8?q?Alt+=20a=20number=20returns=20to=20the=20previous=20tab?= =?UTF-8?q?=20if=20we=20are=20already=20on=20tab=20=E2=80=9Cnumber?= =?UTF-8?q?=E2=80=9D.=20Kassd=C3=A9di=20mrk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core.py b/src/core.py index ce256fe0..47811376 100644 --- a/src/core.py +++ b/src/core.py @@ -628,10 +628,13 @@ class Core(object): if char.startswith('M-') and len(char) == 3: try: nb = int(char[2]) - except: + except ValueError: pass else: - self.command_win('%s' % nb) + if self.current_tab().nb == nb: + self.go_to_previous_tab() + else: + self.command_win('%d' % nb) # search for keyboard shortcut if char in list(self.key_func.keys()): self.key_func[char]() -- cgit v1.2.3