From 8c487e9a5f12a1e3360ec6d205104659c1e86833 Mon Sep 17 00:00:00 2001 From: Nick Ginther Date: Tue, 24 May 2016 15:18:22 -0500 Subject: [PATCH 1/2] fix tabindex statusbar not updating (#1247) --- qutebrowser/mainwindow/tabbedbrowser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index b754ce9cb..708ba8174 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -412,6 +412,8 @@ class TabbedBrowser(tabwidget.TabWidget): background = config.get('tabs', 'background-tabs') if not background: self.setCurrentWidget(tab) + elif background: + self.tab_index_changed.emit(self.currentIndex(), self.count()) tab.show() self.new_tab.emit(tab, idx) return tab From c70accda229b2c8dd67abb29e0f14cfdf5c1c59a Mon Sep 17 00:00:00 2001 From: Nick Ginther Date: Wed, 25 May 2016 13:46:31 -0500 Subject: [PATCH 2/2] restructure code --- qutebrowser/mainwindow/tabbedbrowser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index 708ba8174..701397877 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -410,10 +410,10 @@ class TabbedBrowser(tabwidget.TabWidget): tab.openurl(url) if background is None: background = config.get('tabs', 'background-tabs') - if not background: - self.setCurrentWidget(tab) - elif background: + if background: self.tab_index_changed.emit(self.currentIndex(), self.count()) + else: + self.setCurrentWidget(tab) tab.show() self.new_tab.emit(tab, idx) return tab