mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 11:35:35 +03:00
Refactor slightly
This commit is contained in:
parent
2edb306456
commit
e13f7aff89
@ -233,13 +233,7 @@ class MainWindow: NSObject,
|
||||
case .ipcBecameInvalid(let reason): self.ipcBecameInvalid(reason: reason)
|
||||
case .scroll: self.scroll()
|
||||
case .cursor(let position): self.cursor(to: position)
|
||||
case .initError:
|
||||
let notification = NSUserNotification()
|
||||
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.deliver(notification)
|
||||
case .initError: self.showInitError()
|
||||
|
||||
}
|
||||
})
|
||||
@ -415,4 +409,13 @@ class MainWindow: NSObject,
|
||||
self.window.contentView?.addSubview(self.workspace)
|
||||
self.workspace.autoPinEdgesToSuperviewEdges()
|
||||
}
|
||||
|
||||
private func showInitError() {
|
||||
let notification = NSUserNotification()
|
||||
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.deliver(notification)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user