summaryrefslogtreecommitdiff
path: root/qutebrowser/mainwindow/tabbedbrowser.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-11-22 18:05:36 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-11-22 18:05:36 +0100
commit568b1e253af78c7f19497daf1bbb442377bd1179 (patch)
treeeef87cabdf4bb03927a482ac9e189e1749559172 /qutebrowser/mainwindow/tabbedbrowser.py
parentcac9e3e049de88f5892719ac484d69aab3e688d5 (diff)
parent73aed03a7f9bb630ba6412abff22f52c56c00485 (diff)
downloadqutebrowser-568b1e253af78c7f19497daf1bbb442377bd1179.tar.gz
qutebrowser-568b1e253af78c7f19497daf1bbb442377bd1179.zip
Merge remote-tracking branch 'origin/pr/6796'
Diffstat (limited to 'qutebrowser/mainwindow/tabbedbrowser.py')
-rw-r--r--qutebrowser/mainwindow/tabbedbrowser.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py
index e081284ee..8c6ac2424 100644
--- a/qutebrowser/mainwindow/tabbedbrowser.py
+++ b/qutebrowser/mainwindow/tabbedbrowser.py
@@ -406,15 +406,16 @@ class TabbedBrowser(QWidget):
else:
yes_action()
- def close_tab(self, tab, *, add_undo=True, new_undo=True):
+ def close_tab(self, tab, *, add_undo=True, new_undo=True, transfer=False):
"""Close a tab.
Args:
tab: The QWebView to be closed.
add_undo: Whether the tab close can be undone.
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