diff --git a/kittens/hints/main.py b/kittens/hints/main.py index e6e4445ab..0ffeda3d3 100644 --- a/kittens/hints/main.py +++ b/kittens/hints/main.py @@ -369,7 +369,7 @@ def handle_result(args: List[str], data: Dict[str, Any], target_window_id: int, m.append('{}={}'.format(k, v or '')) if launch_args: w = boss.window_id_map.get(target_window_id) - boss.call_remote_control(active_window=w, args=tuple(launch_args + ([m] if isinstance(m, str) else m))) + boss.call_remote_control(self_window=w, args=tuple(launch_args + ([m] if isinstance(m, str) else m))) else: boss.open_url(m, program, cwd=cwd) diff --git a/kitty/boss.py b/kitty/boss.py index ee1f479bb..790482785 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -708,7 +708,7 @@ class Boss: import shlex self.show_error(_('remote_control mapping failed'), shlex.join(args) + '\n' + str(e)) - def call_remote_control(self, active_window: Optional[Window], args: Tuple[str, ...]) -> 'ResponseType': + def call_remote_control(self, self_window: Optional[Window], args: Tuple[str, ...]) -> 'ResponseType': from .rc.base import PayloadGetter, command_for_name, parse_subcommand_cli from .remote_control import parse_rc_args aa = list(args) @@ -730,9 +730,9 @@ class Boss: try: if isinstance(payload, types.GeneratorType): for x in payload: - c.response_from_kitty(self, active_window, PayloadGetter(c, x if isinstance(x, dict) else {})) + c.response_from_kitty(self, self_window, PayloadGetter(c, x if isinstance(x, dict) else {})) return None - return c.response_from_kitty(self, active_window, PayloadGetter(c, payload if isinstance(payload, dict) else {})) + return c.response_from_kitty(self, self_window, PayloadGetter(c, payload if isinstance(payload, dict) else {})) except Exception as e: if silent: log_error(f'Failed to run remote_control mapping: {aa} with error: {e}')