mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Fix a regression in notify_on_cmd_finish that caused notifications to appear for every command after the first
Fixes #7725
This commit is contained in:
@@ -138,6 +138,8 @@ Detailed list of changes
|
||||
|
||||
- macOS: Bump the minimum required macOS version to Catalina released five years ago.
|
||||
|
||||
- Fix a regression in :opt:`notify_on_cmd_finish` that caused notifications to appear for every command after the first (:iss:`7725`)
|
||||
|
||||
|
||||
0.35.2 [2024-06-22]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -1452,13 +1452,13 @@ class Window:
|
||||
def handle_cmd_end(self, exit_status: str = '') -> None:
|
||||
if self.last_cmd_output_start_time == 0.:
|
||||
return
|
||||
self.last_cmd_output_start_time = 0.
|
||||
try:
|
||||
self.last_cmd_exit_status = int(exit_status)
|
||||
except Exception:
|
||||
self.last_cmd_exit_status = 0
|
||||
end_time = monotonic()
|
||||
last_cmd_output_duration = end_time - self.last_cmd_output_start_time
|
||||
self.last_cmd_output_start_time = 0.
|
||||
|
||||
self.call_watchers(self.watchers.on_cmd_startstop, {
|
||||
"is_start": False, "time": end_time, 'cmdline': self.last_cmd_cmdline, 'exit_status': self.last_cmd_exit_status})
|
||||
|
||||
Reference in New Issue
Block a user