Merge branch 't-wissmann-gt'

This commit is contained in:
Florian Bruhin 2015-08-11 22:01:35 +02:00
commit 4d7949cc3e
4 changed files with 9 additions and 2 deletions

View File

@ -158,6 +158,7 @@ Contributors, sorted by the number of commits in descending order:
* sbinix
* Tobias Patzl
* Johannes Altmanninger
* Thorsten Wißmann
* Samir Benmendil
* Regina Hug
* Mathias Fussenegger
@ -167,7 +168,6 @@ Contributors, sorted by the number of commits in descending order:
* zwarag
* error800
* Tim Harder
* Thorsten Wißmann
* Thiago Barroso Perrotta
* Matthias Lisin
* Helen Sherwood-Taylor

View File

@ -630,6 +630,8 @@ Syntax: +:tab-focus ['index']+
Select the tab given as argument/[count].
If neither count nor index are given, it behaves like tab-next.
==== positional arguments
* +'index'+: The tab index to focus, starting with 1. The special value `last` focuses the last focused tab.

View File

@ -878,6 +878,8 @@ class CommandDispatcher:
def tab_focus(self, index: {'type': (int, 'last')}=None, count=None):
"""Select the tab given as argument/[count].
If neither count nor index are given, it behaves like tab-next.
Args:
index: The tab index to focus, starting with 1. The special value
`last` focuses the last focused tab.
@ -886,6 +888,9 @@ class CommandDispatcher:
if index == 'last':
self._tab_focus_last()
return
if index is None and count is None:
self.tab_next()
return
try:
idx = cmdutils.arg_or_count(index, count, default=1,
countzero=self._count())

View File

@ -1236,7 +1236,7 @@ KEY_DATA = collections.OrderedDict([
('tab-move', ['gm']),
('tab-move -', ['gl']),
('tab-move +', ['gr']),
('tab-next', ['J', 'gt']),
('tab-focus', ['J', 'gt']),
('tab-prev', ['K', 'gT']),
('tab-clone', ['gC']),
('reload', ['r']),