summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Kamat <jaygkamat@gmail.com>2017-06-30 09:57:39 -0700
committerJay Kamat <jaygkamat@gmail.com>2017-06-30 09:57:39 -0700
commit2fbadc46d21e5a76d94904e951105464c1acebfb (patch)
tree6ed19b18bc881cc759a1ebd80a8e93a0f3d7649e
parent596dee69d61baeb5cdbed8d9d044597f2038d275 (diff)
downloadqutebrowser-2fbadc46d21e5a76d94904e951105464c1acebfb.tar.gz
qutebrowser-2fbadc46d21e5a76d94904e951105464c1acebfb.zip
Remove error when count is invalid to :tab-pin
-rw-r--r--qutebrowser/browser/commands.py2
-rw-r--r--tests/end2end/features/tabs.feature3
2 files changed, 2 insertions, 3 deletions
diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py
index f21115db5..0b448a845 100644
--- a/qutebrowser/browser/commands.py
+++ b/qutebrowser/browser/commands.py
@@ -277,7 +277,7 @@ class CommandDispatcher:
"""
tab = self._cntwidget(count)
if tab is None:
- raise cmdexc.CommandError("Tab {} does not exist!".format(count))
+ return
to_pin = not tab.data.pinned
self._tabbed_browser.set_tab_pinned(tab, to_pin)
diff --git a/tests/end2end/features/tabs.feature b/tests/end2end/features/tabs.feature
index 1d3f22b10..8097f390e 100644
--- a/tests/end2end/features/tabs.feature
+++ b/tests/end2end/features/tabs.feature
@@ -1078,8 +1078,7 @@ Feature: Tab management
And I open data/numbers/2.txt in a new tab
And I open data/numbers/3.txt in a new tab
And I run :tab-pin with count 23
- Then the error "Tab 23 does not exist!" should be shown
- And the following tabs should be open:
+ Then the following tabs should be open:
- data/numbers/1.txt
- data/numbers/2.txt
- data/numbers/3.txt (active)