Fix behavior when toggling stacking behavior in a single tab

This commit is contained in:
Jay Kamat 2018-06-21 18:58:48 -04:00
parent 0e7bbccd71
commit 454c532668
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5
2 changed files with 4 additions and 4 deletions

View File

@ -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`.

View File

@ -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':