From 7b20bf479292a5cfb3bceb3266c985c966408bfc Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 24 Sep 2018 11:06:41 +0200 Subject: [PATCH] Fix tab_focus_last behaviour with :tab-focus -1 See #4248 --- qutebrowser/browser/commands.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index a66a8fdea..51905f74d 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1116,9 +1116,6 @@ class CommandDispatcher: if index == 'last': self._tab_focus_last() return - elif not no_last and index == self._current_index() + 1: - self._tab_focus_last(show_error=False) - return elif index is None: self.tab_next() return @@ -1126,6 +1123,10 @@ class CommandDispatcher: if index < 0: index = self._count() + index + 1 + if not no_last and index == self._current_index() + 1: + self._tab_focus_last(show_error=False) + return + if 1 <= index <= self._count(): self._set_current_index(index - 1) else: