diff --git a/README.asciidoc b/README.asciidoc index 4b072684c..2ee5a9402 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -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 diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index a898b9698..012522909 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -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. diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 5a07dbb56..1fc2a5bf7 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -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()) diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 7a1f4f236..5e40bf7e1 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -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']),