Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
poezio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
178
Issues
178
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poezio
poezio
Commits
165ee9ee
Commit
165ee9ee
authored
Apr 12, 2014
by
mathieui
3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #2503/4 (use “.” as an alias for the current tab in /move_tab)
parent
f58dfe26
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
doc/source/commands.rst
doc/source/commands.rst
+6
-4
src/core/commands.py
src/core/commands.py
+6
-0
src/core/core.py
src/core/core.py
+2
-1
No files found.
doc/source/commands.rst
View file @
165ee9ee
...
...
@@ -141,12 +141,14 @@ These commands work in *any* tab.
/move_tab
**Usage:** ``/move_tab <source> <destination>``
Move tab <source> to <destination>. If
the create_gaps option is true, then it will leave a gap at the <source>
position, leading to usual behaviour. If create_gaps is not enabled, then the
tabs will
number from 0 to your actual tab number, without gaps (which means
Move tab <source> to <destination>. If
the :term:`create_gaps` option
is true, then it will leave a gap at the <source> position, leading
to usual behaviour. If create_gaps is not enabled, then the tabs will
number from 0 to your actual tab number, without gaps (which means
their number will change if you close a tab on the left of the list).
A value of ``.`` for a parameter means the current tab.
/theme
**Usage:** ``/theme [theme_name]``
...
...
src/core/commands.py
View file @
165ee9ee
...
...
@@ -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
:
...
...
src/core/core.py
View file @
165ee9ee
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment