From 80a617a9ecc688210dc409aecac4c62b09b8e602 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 2 Oct 2025 10:06:07 +0530 Subject: [PATCH] ... --- kitty/window.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/window.py b/kitty/window.py index 6d6256247..0687bbfbc 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -718,12 +718,12 @@ class Window: self.title_stack: Deque[str] = deque(maxlen=10) self.user_vars: dict[str, str] = {} self.id: int = add_window(tab.os_window_id, tab.id, self.title) + if not self.id: + raise Exception(f'No tab with id: {tab.id} in OS Window: {tab.os_window_id} was found, or the window counter wrapped') self.clipboard_request_manager = ClipboardRequestManager(self.id) self.margin = EdgeWidths() self.padding = EdgeWidths() self.kitten_result: dict[str, Any] | None = None - if not self.id: - raise Exception(f'No tab with id: {tab.id} in OS Window: {tab.os_window_id} was found, or the window counter wrapped') self.tab_id = tab.id self.os_window_id = tab.os_window_id self.tabref: Callable[[], TabType | None] = weakref.ref(tab)