From db584694adc837ff4743abe2d555f74f2985c9d7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 12 Aug 2025 15:38:34 +0530 Subject: [PATCH] Fix serialization not working when active_tab_history is empty --- kitty/tabs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/tabs.py b/kitty/tabs.py index 49ef66f79..cf3f00220 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -1189,7 +1189,7 @@ class TabManager: # {{{ def serialize_state_as_session(self) -> list[str]: tmap = {tab.id: tab for tab in self} ans = [] - for tab_id in self.active_tab_history: + for tab_id in self.active_tab_history or tmap: tab = tmap.get(tab_id) if tab is not None: ans.extend(tab.serialize_state_as_session())