summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Gadanidis <tim@gadanidis.ca>2021-11-13 15:50:26 -0500
committerTim Gadanidis <tim@gadanidis.ca>2021-11-13 15:50:26 -0500
commit47f6bd85af4bf6d65b4a0ef0e460e1e557226264 (patch)
tree8dfe7e73dd22c8f898561f1a3882365e7806d92c
parent5e5c778b4a1418bc4f06cf78885b8a895f5cf720 (diff)
downloadqutebrowser-47f6bd85af4bf6d65b4a0ef0e460e1e557226264.tar.gz
qutebrowser-47f6bd85af4bf6d65b4a0ef0e460e1e557226264.zip
Simplify logic
-rw-r--r--qutebrowser/mainwindow/tabbedbrowser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py
index 47bb32a6f..8c6ac2424 100644
--- a/qutebrowser/mainwindow/tabbedbrowser.py
+++ b/qutebrowser/mainwindow/tabbedbrowser.py
@@ -415,20 +415,20 @@ class TabbedBrowser(QWidget):
new_undo: Whether the undo entry should be a new item in the stack.
transfer: Whether the tab is closing because it is moving to a new window.
"""
- if config.val.tabs.tabs_are_windows:
+ if config.val.tabs.tabs_are_windows or transfer:
last_close = 'close'
else:
last_close = config.val.tabs.last_close
count = self.widget.count()
- if last_close == 'ignore' and count == 1 and not transfer:
+ if last_close == 'ignore' and count == 1:
return
self._remove_tab(tab, add_undo=add_undo, new_undo=new_undo)
if count == 1: # We just closed the last tab above.
- if last_close == 'close' or transfer:
+ if last_close == 'close':
self.close_window.emit()
elif last_close == 'blank':
self.load_url(QUrl('about:blank'), newtab=True)