diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index b8eb8a226..70f1b5088 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -99,10 +99,11 @@ class TabWidget(QTabWidget): Args: idx: The tab index. - pinned: Pinned tab state. + pinned: Pinned tab state to set. """ bar = self.tabBar() bar.set_tab_data(idx, 'pinned', pinned) + self.update_tab_title(idx) bar.update(bar.tabRect(idx)) if pinned: @@ -189,8 +190,7 @@ class TabWidget(QTabWidget): @config.change_filter('tabs', 'title-format-pinned') def update_tab_titles_pinned(self): """Update all texts.""" - for idx in range(self.count()): - self.update_tab_title(idx) + self.update_tab_titles() def tabInserted(self, idx): """Update titles when a tab was inserted.""" diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py index 3b6d86c3d..72074e247 100644 --- a/tests/end2end/features/conftest.py +++ b/tests/end2end/features/conftest.py @@ -159,7 +159,7 @@ def clean_open_tabs(quteproc): """Clean up open windows and tabs.""" quteproc.set_setting('tabs', 'last-close', 'blank') quteproc.send_cmd(':window-only') - quteproc.send_cmd(':tab-only') + quteproc.send_cmd(':tab-only --force') quteproc.send_cmd(':tab-close --force') quteproc.wait_for_load_finished_url('about:blank')