From f10f45e4323fbe39e2f138dd9f7ce47544c110d6 Mon Sep 17 00:00:00 2001 From: Rafal Chlodnicki Date: Thu, 25 Jan 2024 22:29:35 +0100 Subject: [PATCH] fix KeyError exception triggered on closing a window --- plugin/core/windows.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/core/windows.py b/plugin/core/windows.py index cd1e8b578..1c4cb43f9 100644 --- a/plugin/core/windows.py +++ b/plugin/core/windows.py @@ -545,7 +545,7 @@ def listener_for_view(self, view: sublime.View) -> Optional[AbstractViewListener def discard(self, window: sublime.Window) -> None: wm = self._windows.pop(window.id(), None) if wm: - wm.destroy() + sublime.set_timeout_async(wm.destroy) class RequestTimeTracker: