diff --git a/NvimView/NvimView/NvimView+Resize.swift b/NvimView/NvimView/NvimView+Resize.swift index 75263ac9..01d68f61 100644 --- a/NvimView/NvimView/NvimView+Resize.swift +++ b/NvimView/NvimView/NvimView+Resize.swift @@ -62,12 +62,14 @@ extension NvimView { if noErrorDuringInitialization == false { self.logger.fault("There was an error launching neovim.") - let alert = NSAlert() - alert.alertStyle = .warning - alert.messageText = "Error during initialization" - alert.informativeText = "There was an error during the initialization of NeoVim. " + - "Use :messages to view the error messages." - alert.runModal() + DispatchQueue.main.async { + let alert = NSAlert() + alert.alertStyle = .warning + alert.messageText = "Error during initialization" + alert.informativeText = "There was an error during the initialization of NeoVim. " + + "Use :messages to view the error messages." + alert.runModal() + } } }