1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-28 11:35:35 +03:00

Refactor slightly

This commit is contained in:
Tae Won Ha 2017-12-17 23:39:49 +01:00
parent 2edb306456
commit e13f7aff89
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -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)
}
}