Wrap tabs on :tab-move +/- if tabs->wrap is true.
This commit is contained in:
parent
eff0e4c7cc
commit
de3460da3e
@ -900,6 +900,8 @@ class CommandDispatcher:
|
|||||||
new_idx = self._current_index() - delta
|
new_idx = self._current_index() - delta
|
||||||
elif direction == '+': # pragma: no branch
|
elif direction == '+': # pragma: no branch
|
||||||
new_idx = self._current_index() + delta
|
new_idx = self._current_index() + delta
|
||||||
|
if config.get('tabs', 'wrap'):
|
||||||
|
new_idx = new_idx % self._count()
|
||||||
else: # pragma: no cover
|
else: # pragma: no cover
|
||||||
raise ValueError("Invalid direction '{}'!".format(direction))
|
raise ValueError("Invalid direction '{}'!".format(direction))
|
||||||
|
|
||||||
|
@ -384,7 +384,8 @@ Feature: Tab management
|
|||||||
- data/numbers/2.txt
|
- data/numbers/2.txt
|
||||||
|
|
||||||
Scenario: :tab-move with relative position and too big count.
|
Scenario: :tab-move with relative position and too big count.
|
||||||
When I open data/numbers/1.txt
|
When I set tabs -> wrap to false
|
||||||
|
And I open data/numbers/1.txt
|
||||||
And I open data/numbers/2.txt in a new tab
|
And I open data/numbers/2.txt in a new tab
|
||||||
And I open data/numbers/3.txt in a new tab
|
And I open data/numbers/3.txt in a new tab
|
||||||
And I run :tab-focus 1
|
And I run :tab-focus 1
|
||||||
|
Loading…
Reference in New Issue
Block a user