mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 03:01:57 +02:00
...
This commit is contained in:
@@ -1189,8 +1189,7 @@ class TabManager: # {{{
|
|||||||
def serialize_state_as_session(self, is_first: bool = False) -> list[str]:
|
def serialize_state_as_session(self, is_first: bool = False) -> list[str]:
|
||||||
ans = []
|
ans = []
|
||||||
hmap = {tab_id: i for i, tab_id in enumerate(self.active_tab_history)}
|
hmap = {tab_id: i for i, tab_id in enumerate(self.active_tab_history)}
|
||||||
at = self.active_tab
|
if (at := self.active_tab) is not None:
|
||||||
if at is not None:
|
|
||||||
hmap[at.id] = len(self.active_tab_history) + 1
|
hmap[at.id] = len(self.active_tab_history) + 1
|
||||||
def skey(tab: Tab) -> int:
|
def skey(tab: Tab) -> int:
|
||||||
return hmap.get(tab.id, -1)
|
return hmap.get(tab.id, -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user