MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / deferredClose

Function deferredClose

packages/app-core/src/components/FloatingNoteApp.tsx:511–513  ·  view source on GitHub ↗

Defer the window close by one tick so CM-Vim can finish unwinding its * ex-command stack before the renderer is torn down. Closing synchronously * from inside the ex callback means any follow-up IPC (history writes, * panel cleanup) races against the already-destroyed WebContents and * surfa

()

Source from the content-addressed store, hash-verified

509 * panel cleanup) races against the already-destroyed WebContents and
510 * surfaces as a "TypeError: Object has been destroyed" in main. */
511function deferredClose(): void {
512 setTimeout(() => floatingHandlers.close?.(), 0)
513}
514
515function registerFloatingVimCommands(): void {
516 if (floatingVimRegistered) return

Callers 1

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected