diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-04-05 20:51:35 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-04-05 20:51:35 +0200 |
commit | ce5d67d8f621a1c42d438a65afbf53dba4c6966b (patch) | |
tree | c82eb3fcbada3a89a9b65f10e45b95f23a920003 | |
parent | f4c138e444bb5913e3d9a940999949c43dc25825 (diff) | |
download | poezio-ce5d67d8f621a1c42d438a65afbf53dba4c6966b.tar.gz poezio-ce5d67d8f621a1c42d438a65afbf53dba4c6966b.tar.bz2 poezio-ce5d67d8f621a1c42d438a65afbf53dba4c6966b.tar.xz poezio-ce5d67d8f621a1c42d438a65afbf53dba4c6966b.zip |
Alt+ a number returns to the previous tab if we are already on tab “number”.
Kassdédi mrk
-rw-r--r-- | src/core.py | 7 |
1 files 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]() |