Remove error when count is invalid to :tab-pin

This commit is contained in:
Jay Kamat 2017-06-30 09:57:39 -07:00
parent 596dee69d6
commit 2fbadc46d2
2 changed files with 2 additions and 3 deletions

View File

@ -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)

View File

@ -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)