summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-12 02:59:49 +0200
committermathieui <mathieui@mathieui.net>2014-04-12 02:59:49 +0200
commit165ee9ee1a00fc3eb4ddd606e023c6653ab8c686 (patch)
tree3e74607b40139679e5546ebcec0fb09838e4e60d /src
parentf58dfe26af22495be56400dd91983bc46955c1bf (diff)
downloadpoezio-165ee9ee1a00fc3eb4ddd606e023c6653ab8c686.tar.gz
poezio-165ee9ee1a00fc3eb4ddd606e023c6653ab8c686.tar.bz2
poezio-165ee9ee1a00fc3eb4ddd606e023c6653ab8c686.tar.xz
poezio-165ee9ee1a00fc3eb4ddd606e023c6653ab8c686.zip
Fix #2503/4 (use “.” as an alias for the current tab in /move_tab)
Diffstat (limited to 'src')
-rw-r--r--src/core/commands.py6
-rw-r--r--src/core/core.py3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/core/commands.py b/src/core/commands.py
index f2a6d2f4..39bf505d 100644
--- a/src/core/commands.py
+++ b/src/core/commands.py
@@ -218,6 +218,12 @@ def command_move_tab(self, arg):
current_tab = self.current_tab()
if len(args) != 2:
return self.command_help('move_tab')
+
+ if args[0] == '.':
+ args[0] = current_tab.nb
+ if args[1] == '.':
+ args[1] = current_tab.nb
+
def get_nb_from_value(value):
ref = None
try:
diff --git a/src/core/core.py b/src/core/core.py
index 39eb31b7..41cb9586 100644
--- a/src/core/core.py
+++ b/src/core/core.py
@@ -1466,7 +1466,8 @@ class Core(object):
"<destination>. This will make the following tabs shift in"
" some cases (refer to the documentation). A tab can be "
"designated by its number or by the beginning of its "
- "address."),
+ "address. You can use \".\" as a shortcut for the current "
+ "tab."),
shortdesc=_('Move a tab.'),
completion=self.completion_move_tab)
self.register_command('show', self.command_status,