mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-25 23:02:35 +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)
|
self.resizeNeoVimUi(to: self.bounds.size)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func userNotificationCenter(_ center: NSUserNotificationCenter,
|
|
||||||
shouldPresent notification: NSUserNotification) -> Bool {
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func discreteSize(size: CGSize) -> Size {
|
func discreteSize(size: CGSize) -> Size {
|
||||||
return Size(width: Int(floor(size.width / self.cellSize.width)),
|
return Size(width: Int(floor(size.width / self.cellSize.width)),
|
||||||
height: Int(floor(size.height / self.cellSize.height)))
|
height: Int(floor(size.height / self.cellSize.height)))
|
||||||
@ -77,14 +71,12 @@ extension NvimView {
|
|||||||
self.logger.fault("There was an error launching neovim.")
|
self.logger.fault("There was an error launching neovim.")
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
let notification = NSUserNotification()
|
let alert = NSAlert()
|
||||||
notification.identifier = self.uuid
|
alert.alertStyle = .warning
|
||||||
notification.title = "Error during initialization"
|
alert.messageText = "Error during initialization"
|
||||||
notification.informativeText = "There was an error during the initialization of NeoVim. " +
|
alert.informativeText = "There was an error during the initialization of NeoVim. " +
|
||||||
"Use :messages to view the error messages."
|
"Use :messages to view the error messages."
|
||||||
|
alert.runModal()
|
||||||
NSUserNotificationCenter.default.delegate = self
|
|
||||||
NSUserNotificationCenter.default.deliver(notification)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,7 @@ import RxSwift
|
|||||||
public class NvimView: NSView,
|
public class NvimView: NSView,
|
||||||
NvimUiBridgeProtocol,
|
NvimUiBridgeProtocol,
|
||||||
NSUserInterfaceValidations,
|
NSUserInterfaceValidations,
|
||||||
NSTextInputClient,
|
NSTextInputClient {
|
||||||
NSUserNotificationCenterDelegate {
|
|
||||||
|
|
||||||
// MARK: - Public
|
// MARK: - Public
|
||||||
public struct Config {
|
public struct Config {
|
||||||
|
Loading…
Reference in New Issue
Block a user