summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-12-09 16:43:23 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-12-09 16:43:23 +0100
commit2e25595aec8c80cb2979acba50604345b79c1170 (patch)
tree16b7855b1e363ac1ef58fbc8e62e8ff368ddcf35
parented7fe693b4e2a4354a7db58d03bc74f155f1ad71 (diff)
downloadpoezio-2e25595aec8c80cb2979acba50604345b79c1170.tar.gz
poezio-2e25595aec8c80cb2979acba50604345b79c1170.tar.bz2
poezio-2e25595aec8c80cb2979acba50604345b79c1170.tar.xz
poezio-2e25595aec8c80cb2979acba50604345b79c1170.zip
Introduce the go_to_previous_tab_on_alt_number option
fix #2841
-rw-r--r--doc/source/configuration.rst8
-rw-r--r--src/config.py1
-rw-r--r--src/core/core.py2
3 files changed, 10 insertions, 1 deletions
diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index 737d463d..b32cbec3 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -316,6 +316,14 @@ to understand what is :ref:`carbons <carbons-details>` or
If this is set to ``false``, you will no longer be subscribed to tune events,
and the :term:`display_tune_notifications` option will be ignored.
+ go_to_previous_tab_on_alt_number
+
+ **Default value:** ``false``
+
+ If this is set to ``true``, when Alt+x is pressed, where x is a
+ number, if you are already on the tab number x, you will jump to the
+ previously selected tab. Otherwise you’ll stay on the same tab.
+
group_corrections
**Default value:** ``true``
diff --git a/src/config.py b/src/config.py
index 563c16be..eaadb9d6 100644
--- a/src/config.py
+++ b/src/config.py
@@ -58,6 +58,7 @@ DEFAULT_CONFIG = {
'extract_inline_images': True,
'filter_info_messages': '',
'force_encryption': True,
+ 'go_to_previous_tab_on_alt_number': False,
'group_corrections': True,
'hide_exit_join': -1,
'hide_status_change': 120,
diff --git a/src/core/core.py b/src/core/core.py
index f6b973ec..8d7f7fcf 100644
--- a/src/core/core.py
+++ b/src/core/core.py
@@ -592,7 +592,7 @@ class Core(object):
except ValueError:
pass
else:
- if self.current_tab().nb == nb:
+ if self.current_tab().nb == nb and config.get('go_to_previous_tab_on_alt_number'):
self.go_to_previous_tab()
else:
self.command_win('%d' % nb)