mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-24 22:33:52 +03:00
Revert "Use user notification for init errors"
This reverts commit 2745bd9457
.
This commit is contained in:
parent
2745bd9457
commit
bdabf83b38
@ -34,12 +34,6 @@ extension NvimView {
|
||||
self.resizeNeoVimUi(to: self.bounds.size)
|
||||
}
|
||||
|
||||
public func userNotificationCenter(_ center: NSUserNotificationCenter,
|
||||
shouldPresent notification: NSUserNotification) -> Bool {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func discreteSize(size: CGSize) -> Size {
|
||||
return Size(width: Int(floor(size.width / self.cellSize.width)),
|
||||
height: Int(floor(size.height / self.cellSize.height)))
|
||||
@ -77,14 +71,12 @@ extension NvimView {
|
||||
self.logger.fault("There was an error launching neovim.")
|
||||
|
||||
DispatchQueue.main.async {
|
||||
let notification = NSUserNotification()
|
||||
notification.identifier = self.uuid
|
||||
notification.title = "Error during initialization"
|
||||
notification.informativeText = "There was an error during the initialization of NeoVim. " +
|
||||
"Use :messages to view the error messages."
|
||||
|
||||
NSUserNotificationCenter.default.delegate = self
|
||||
NSUserNotificationCenter.default.deliver(notification)
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,8 +10,7 @@ import RxSwift
|
||||
public class NvimView: NSView,
|
||||
NvimUiBridgeProtocol,
|
||||
NSUserInterfaceValidations,
|
||||
NSTextInputClient,
|
||||
NSUserNotificationCenterDelegate {
|
||||
NSTextInputClient {
|
||||
|
||||
// MARK: - Public
|
||||
public struct Config {
|
||||
|
Loading…
Reference in New Issue
Block a user