From f78241f2ef72fbcaff789004d982aaff93b22424 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 30 Dec 2019 22:28:31 +0100 Subject: Also prevent :tab-give with tabs_are_windows --- qutebrowser/browser/commands.py | 4 ++++ tests/end2end/features/tabs.feature | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index ab7e60aed..51222521e 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -462,6 +462,10 @@ class CommandDispatcher: keep: If given, keep the old tab around. count: Overrides win_id (index starts at 1 for win_id=0). """ + if config.val.tabs.tabs_are_windows: + raise cmdutils.CommandError("Can't give tabs when using " + "windows as tabs") + if count is not None: win_id = count - 1 diff --git a/tests/end2end/features/tabs.feature b/tests/end2end/features/tabs.feature index 0692e78a6..18744b30f 100644 --- a/tests/end2end/features/tabs.feature +++ b/tests/end2end/features/tabs.feature @@ -1261,6 +1261,13 @@ Feature: Tab management And I run :tab-give 99 Then the error "There's no window with id 99!" should be shown + Scenario: Give a tab while using tabs_are_windows + When I open data/numbers/1.txt + And I open data/numbers/2.txt in a new window + And I set tabs.tabs_are_windows to true + And I run :tab-give 0/1 + Then the error "Can't give tabs when using windows as tabs" should be shown + # Other Scenario: Using :tab-next after closing last tab (#1448) -- cgit v1.2.3-54-g00ecf