mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-20 20:22:10 +00:00
...
This commit is contained in:
parent
5bb6b29ca3
commit
8613c6e1cd
2 changed files with 5 additions and 5 deletions
|
|
@ -904,7 +904,7 @@ class Window:
|
|||
if data['type'] == 'confirm':
|
||||
get_boss().confirm(
|
||||
message, callback, window=self, confirm_on_cancel=bool(data.get('confirm_on_cancel')),
|
||||
confirm_on_accept=bool(data.get('confirm_on_accept')))
|
||||
confirm_on_accept=bool(data.get('confirm_on_accept', True)))
|
||||
elif data['type'] == 'choose':
|
||||
get_boss().choose(
|
||||
message, callback, *data['choices'], window=self, default=data.get('default', ''))
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ with SharedMemory(
|
|||
if shm.read(1) == b'\x01':
|
||||
break
|
||||
response = json.loads(shm.read_data_with_size())
|
||||
if is_confirm:
|
||||
response = 'yes' if response else 'no'
|
||||
if response:
|
||||
print(response, flush=True)
|
||||
if is_confirm:
|
||||
response = 'yes' if response else 'no'
|
||||
if response:
|
||||
print(response, flush=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue