From 454c532668633d0e53ceab3ae3c4cc05654b3022 Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Thu, 21 Jun 2018 18:58:48 -0400 Subject: [PATCH] Fix behavior when toggling stacking behavior in a single tab --- qutebrowser/config/configdata.yml | 2 +- qutebrowser/mainwindow/tabbedbrowser.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index e17f6afac..d4cfcd020 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1365,7 +1365,7 @@ tabs.new_position.stacking: default: true type: Bool desc: >- - Stack relative tabs on top of each other when opened consecutively. + Stack related tabs on top of each other when opened consecutively. Only applies `next` and `prev` values of `tabs.new_position.related` and `tabs.new_position.unrelated`. diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index bc054900a..c0c303414 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -530,17 +530,17 @@ class TabbedBrowser(QWidget): idx = self._tab_insert_idx_left # On first sight, we'd think we have to decrement # self._tab_insert_idx_left here, as we want the next tab to be - # *before* the one we just opened. However, since we opened a tab - # *before* the currently focused tab, indices will shift by + # *before* the one we just opened. However, since we opened a + # tab *before* the currently focused tab, indices will shift by # 1 automatically. else: idx = self.widget.currentIndex() elif pos == 'next': if config.val.tabs.new_position.stacking: idx = self._tab_insert_idx_right - self._tab_insert_idx_right += 1 else: idx = self.widget.currentIndex() + 1 + self._tab_insert_idx_right += 1 elif pos == 'first': idx = 0 elif pos == 'last':