Alt+ a number returns to the previous tab if we are already on tab “number”.

Kassdédi mrk
This commit is contained in:
Florent Le Coz 2011-04-05 20:51:35 +02:00
parent f4c138e444
commit ce5d67d8f6

View file

@ -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]()