Avoid quadratic algorithm
This commit is contained in:
parent
4122f029df
commit
ec6910074f
1 changed files with 3 additions and 2 deletions
|
|
@ -268,9 +268,10 @@ def _startup(self, session_tab: SessionTab) -> None:
|
|||
if window.focus_matching_window_spec:
|
||||
# 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)
|
||||
awq = {w.id for w in all_windows}
|
||||
all_windows.extend(w for w in self if w.id not in awq)
|
||||
for w in boss.match_windows(
|
||||
window.focus_matching_window_spec, launched_window or boss.active_window, all_windows
|
||||
window.focus_matching_window_spec, launched_window or boss.active_window, all_windows
|
||||
):
|
||||
tab = w.tabref()
|
||||
if tab:
|
||||
|
|
|
|||
Loading…
Reference in a new issue