summaryrefslogtreecommitdiff
path: root/qutebrowser/browser/commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/browser/commands.py')
-rw-r--r--qutebrowser/browser/commands.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py
index ec43a3210..936af5402 100644
--- a/qutebrowser/browser/commands.py
+++ b/qutebrowser/browser/commands.py
@@ -764,7 +764,8 @@ class CommandDispatcher:
"""
cmdutils.check_exclusive((prev, next_), 'pn')
cur_idx = self._tabbed_browser.widget.currentIndex()
- assert cur_idx != -1
+ if cur_idx == -1:
+ raise cmdutils.CommandError("Failed to get current tab for :tab-only")
def _to_close(i):
"""Helper method to check if a tab should be closed or not."""