This commit is contained in:
Kovid Goyal 2025-02-18 19:46:45 +05:30
parent 8f44e16b89
commit ba24ce52df
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -1967,10 +1967,8 @@ def run_kitten_with_metadata(
copts = common_opts_as_dict(get_options())
final_args: list[str] = []
for x in args:
if x == '@selection':
sel = self.data_for_at(which='@selection', window=w)
if sel:
x = sel
if x == '@selection' and (sel := self.data_for_at(which='@selection', window=w)):
x = sel
final_args.append(x)
env = {
'KITTY_COMMON_OPTS': json.dumps(copts),