mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-20 15:35:03 +02:00
Merge branch 'tab_switch_strategy=left/right' of https://github.com/phanen/kitty
This commit is contained in:
@@ -1442,11 +1442,15 @@ class TabManager: # {{{
|
|||||||
if next_active_tab not in tabs:
|
if next_active_tab not in tabs:
|
||||||
next_active_tab = None
|
next_active_tab = None
|
||||||
case 'left':
|
case 'left':
|
||||||
next_active_tab = tabs[(tabs.index(active_tab_before_removal) - 1 + len(tabs)) % len(tabs)]
|
tab_id = tabs.index(active_tab_before_removal)
|
||||||
remove_from_end_of_active_history(next_active_tab)
|
if tab_id > 0:
|
||||||
|
next_active_tab = tabs[tab_id - 1]
|
||||||
|
remove_from_end_of_active_history(next_active_tab)
|
||||||
case 'right':
|
case 'right':
|
||||||
next_active_tab = tabs[(tabs.index(active_tab_before_removal) + 1) % len(tabs)]
|
tab_id = tabs.index(active_tab_before_removal)
|
||||||
remove_from_end_of_active_history(next_active_tab)
|
if tab_id < len(tabs) - 1:
|
||||||
|
next_active_tab = tabs[tab_id + 1]
|
||||||
|
remove_from_end_of_active_history(next_active_tab)
|
||||||
case 'last':
|
case 'last':
|
||||||
next_active_tab = tabs[-1]
|
next_active_tab = tabs[-1]
|
||||||
remove_from_end_of_active_history(next_active_tab)
|
remove_from_end_of_active_history(next_active_tab)
|
||||||
|
|||||||
Reference in New Issue
Block a user