From 6efb5dc2c20f8beee086def75ab5efd5b85331a5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 16 Dec 2022 19:34:37 +0530 Subject: [PATCH] Auto-create an OS Window if none exists on new_tab --- kitty/boss.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kitty/boss.py b/kitty/boss.py index 87d29ab98..aa4915e77 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -2072,6 +2072,9 @@ class Boss: if not self.os_window_map: self.add_os_window() tm = self.active_tab_manager + if tm is None and not self.os_window_map: + os_window_id = self.add_os_window() + tm = self.os_window_map.get(os_window_id) if tm is not None: return tm.new_tab(special_window=special_window, cwd_from=cwd_from, as_neighbor=as_neighbor) return None