mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-14 01:20:31 +03:00
Fixed confirm_os_window_close bug introduced in commit 7bf83603c8
This commit is contained in:
parent
d12e10830d
commit
dc77009e55
@ -12,7 +12,7 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
- Tall and Fat layouts: Add a ``mirrored`` option to put the full size window
|
||||
on the opposite edge of the screen (:iss:`2654`)
|
||||
|
||||
- Add an option :opt:`confirm_on_os_window_close` to ask for confirmation
|
||||
- Add an option :opt:`confirm_os_window_close` to ask for confirmation
|
||||
when closing an OS window with multiple kitty windows.
|
||||
|
||||
- Add a new mappable ``quit`` action to quit kitty completely.
|
||||
|
@ -732,7 +732,7 @@ class Boss:
|
||||
|
||||
def confirm_os_window_close(self, os_window_id: int) -> None:
|
||||
tm = self.os_window_map.get(os_window_id)
|
||||
if tm is None or self.opts.confirm_os_window_close <= tm.number_of_windows:
|
||||
if tm is None or self.opts.confirm_os_window_close > tm.number_of_windows:
|
||||
mark_os_window_for_close(os_window_id)
|
||||
return
|
||||
if tm is not None:
|
||||
@ -768,7 +768,7 @@ class Boss:
|
||||
num = 0
|
||||
for q in self.os_window_map.values():
|
||||
num += q.number_of_windows
|
||||
if self.opts.confirm_os_window_close <= num or tm is None:
|
||||
if self.opts.confirm_os_window_close > num or tm is None:
|
||||
set_application_quit_request(IMPERATIVE_CLOSE_REQUESTED)
|
||||
return
|
||||
if current_application_quit_request() == CLOSE_BEING_CONFIRMED:
|
||||
|
Loading…
Reference in New Issue
Block a user