From 94b0f92b75abf9b348ac3479031b4e38139c269a Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 26 Jul 2015 12:05:52 +0200 Subject: [PATCH] Fix tabs -> last-close = ignore. See #822 / 71fee12b5b75d62bd22db464ec60c248a585255d. Fixes #834. --- qutebrowser/mainwindow/tabbedbrowser.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index 69de42dc9..842891df6 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -234,9 +234,14 @@ class TabbedBrowser(tabwidget.TabWidget): tab: The QWebView to be closed. """ last_close = config.get('tabs', 'last-close') + count = self.count() + + if last_close == 'ignore' and count == 1: + return + self._remove_tab(tab) - if self.count() == 0: + if count == 1: # We just closed the last tab above. if last_close == 'close': self.close_window.emit() elif last_close == 'blank':