Skip to content

Commit 80a617a

Browse files
committed
...
1 parent 56f26ed commit 80a617a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kitty/window.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,12 +718,12 @@ def __init__(
718718
self.title_stack: Deque[str] = deque(maxlen=10)
719719
self.user_vars: dict[str, str] = {}
720720
self.id: int = add_window(tab.os_window_id, tab.id, self.title)
721+
if not self.id:
722+
raise Exception(f'No tab with id: {tab.id} in OS Window: {tab.os_window_id} was found, or the window counter wrapped')
721723
self.clipboard_request_manager = ClipboardRequestManager(self.id)
722724
self.margin = EdgeWidths()
723725
self.padding = EdgeWidths()
724726
self.kitten_result: dict[str, Any] | None = None
725-
if not self.id:
726-
raise Exception(f'No tab with id: {tab.id} in OS Window: {tab.os_window_id} was found, or the window counter wrapped')
727727
self.tab_id = tab.id
728728
self.os_window_id = tab.os_window_id
729729
self.tabref: Callable[[], TabType | None] = weakref.ref(tab)

0 commit comments

Comments
 (0)