mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-03 22:25:57 +00:00
Correct the naming of the window arg to call_remote_control
This commit is contained in:
parent
498963fc7c
commit
da1276d84a
2 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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}')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue