Jump through the hoops needed to ensure error reporting is done in case of early termination of kittens that use overlay ready notifications

This commit is contained in:
Kovid Goyal
2022-03-24 08:49:36 +05:30
parent c41405fd57
commit bfb8532c52
5 changed files with 36 additions and 23 deletions

View File

@@ -44,6 +44,7 @@ class Handler:
use_alternate_screen = True
mouse_tracking = MouseTracking.none
terminal_io_ended = False
overlay_ready_report_needed = False
def _initialize(
self,
@@ -219,7 +220,7 @@ class HandleResult:
def result_handler(
type_of_input: Optional[str] = None,
no_ui: bool = False,
has_ready_notification: bool = False
has_ready_notification: bool = Handler.overlay_ready_report_needed
) -> Callable[[Callable[..., Any]], HandleResult]:
def wrapper(impl: Callable[..., Any]) -> HandleResult: