Session files: Fix a regression in the previous release that broke matching on windows in the current tab

Fixes #9037
This commit is contained in:
Kovid Goyal 2025-09-29 19:44:01 +05:30
parent 14f75c9a9b
commit 13e3ecad5c
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 9 additions and 1 deletions

View file

@ -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]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -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