Merge pull request #3807 from slackhead/tabs.mute_messages
Add option to mute the Last Tab/First Tab messages when tabs.wrap is false
This commit is contained in:
commit
3f9099613b
@ -1022,7 +1022,7 @@ class CommandDispatcher:
|
||||
elif config.val.tabs.wrap:
|
||||
self._set_current_index(newidx % self._count())
|
||||
else:
|
||||
raise cmdexc.CommandError("First tab")
|
||||
log.webview.debug("First tab")
|
||||
|
||||
@cmdutils.register(instance='command-dispatcher', scope='window')
|
||||
@cmdutils.argument('count', count=True)
|
||||
@ -1042,7 +1042,7 @@ class CommandDispatcher:
|
||||
elif config.val.tabs.wrap:
|
||||
self._set_current_index(newidx % self._count())
|
||||
else:
|
||||
raise cmdexc.CommandError("Last tab")
|
||||
log.webview.debug("Last tab")
|
||||
|
||||
def _resolve_buffer_index(self, index):
|
||||
"""Resolve a buffer index to the tabbedbrowser and tab.
|
||||
|
@ -336,13 +336,13 @@ Feature: Tab management
|
||||
When I set tabs.wrap to false
|
||||
And I open data/numbers/1.txt
|
||||
And I run :tab-prev
|
||||
Then the error "First tab" should be shown
|
||||
Then "First tab" should be logged
|
||||
|
||||
Scenario: :tab-next with last tab without wrap
|
||||
When I set tabs.wrap to false
|
||||
And I open data/numbers/1.txt
|
||||
And I run :tab-next
|
||||
Then the error "Last tab" should be shown
|
||||
Then "Last tab" should be logged
|
||||
|
||||
Scenario: :tab-prev on first tab with wrap
|
||||
When I set tabs.wrap to true
|
||||
|
Loading…
Reference in New Issue
Block a user