From 13e3ecad5c38aa5546f8985d0ac0f137175ec984 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 29 Sep 2025 19:44:01 +0530 Subject: [PATCH] Session files: Fix a regression in the previous release that broke matching on windows in the current tab Fixes #9037 --- docs/changelog.rst | 3 +++ kitty/tabs.py | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 5aea1db83..1f091fc96 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -155,6 +155,9 @@ Detailed list of changes picker list the sessions in a fixed order rather than by most recent (:disc:`9033`) +- Session files: Fix a regression in the previous release that broke matching on + windows in the current tab (:iss:`9037`) + 0.43.0 [2025-09-28] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/tabs.py b/kitty/tabs.py index 95135fa9f..8f2c0a321 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -266,7 +266,12 @@ class Tab: # {{{ if window.resize_spec is not None: self.resize_window(*window.resize_spec) if window.focus_matching_window_spec: - for w in boss.match_windows(window.focus_matching_window_spec, launched_window or boss.active_window): + # include windows from this tab when matching windows + all_windows = list(boss.all_windows) + all_windows.extend(w for w in self if w not in all_windows) + for w in boss.match_windows( + window.focus_matching_window_spec, launched_window or boss.active_window, all_windows + ): tab = w.tabref() if tab: target_tab = tab or self