@launch: When an overlay window is specified in a particular tab via --match use the active window of that tab as the base, not the current tab. Fixes #5768

This commit is contained in:
Kovid Goyal
2022-12-13 20:15:21 +05:30
parent 2b66775f45
commit eeb772ad07

View File

@@ -548,8 +548,11 @@ def launch(
kw['cmd'] = final_cmd
if force_window_launch and opts.type not in non_window_launch_types:
opts.type = 'window'
if opts.type in ('overlay', 'overlay-main') and active:
kw['overlay_for'] = active.id
base_for_overlay = active
if target_tab:
base_for_overlay = target_tab.active_window
if opts.type in ('overlay', 'overlay-main') and base_for_overlay:
kw['overlay_for'] = base_for_overlay.id
if opts.type == 'background':
cmd = kw['cmd']
if not cmd: