diff options
author | Jethro Cao <jethrocao@gmail.com> | 2019-12-18 01:01:25 +0700 |
---|---|---|
committer | Jethro Cao <jethrocao@gmail.com> | 2019-12-18 02:34:00 +0700 |
commit | 228abd179a9242b77771d9af8d51be3d3180a1e3 (patch) | |
tree | 469704f2d02ab164a4657898aca40930f5b1baff | |
parent | 1c7fb675501ccc52d4f39870074d49fbbe64608f (diff) | |
download | qutebrowser-228abd179a9242b77771d9af8d51be3d3180a1e3.tar.gz qutebrowser-228abd179a9242b77771d9af8d51be3d3180a1e3.zip |
Prevent `:tab-take` when using tabs_are_windows
currently, `tab_take` results in 2nd instance of the taken tab to be
opened as a new window, without the old win/tab getting closed, since
`tabbed_browser.close_tab` does not close the last tab of a window
-rw-r--r-- | qutebrowser/browser/commands.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index b59cb6d26..706fa40ed 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -434,6 +434,10 @@ class CommandDispatcher: in which case the closest match will be taken. keep: If given, keep the old tab around. """ + if config.val.tabs.tabs_are_windows: + raise cmdutils.CommandError("Can't take tabs when using " + "windows as tabs") + tabbed_browser, tab = self._resolve_buffer_index(index) if tabbed_browser is self._tabbed_browser: |