From c392993c79814aa2fc3ee08623975290c821d513 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 17 Jan 2014 08:28:04 +0100 Subject: [PATCH] Don't close last tab --- qutebrowser/browser.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/qutebrowser/browser.py b/qutebrowser/browser.py index ae90c4324..8c982fdf9 100644 --- a/qutebrowser/browser.py +++ b/qutebrowser/browser.py @@ -24,9 +24,13 @@ class TabbedBrowser(TabWidget): @pyqtSlot() def close_act(self): - idx = self.currentIndex() - self.tabs.pop(idx) - self.removeTab(idx) + if len(self.tabs) > 1: + idx = self.currentIndex() + self.tabs.pop(idx) + self.removeTab(idx) + else: + # FIXME + pass class BrowserTab(QWebView): def __init__(self, parent):