1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-28 08:13:17 +03:00

GH-512 Quit the agent when VIMLEAVE event is fired

This commit is contained in:
Tae Won Ha 2017-08-23 08:08:23 +02:00
parent 65cec4e1fb
commit 0c20cebfe6
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -187,14 +187,13 @@ extension NeoVimView {
self.quitNeoVimCondition.unlock()
gui.async {
self.agent.quit()
self.delegate?.neoVimStopped()
}
}
public func autoCommandEvent(_ event: NeoVimAutoCommandEvent, bufferHandle: Int) {
gui.async {
// self.bridgeLogger.debug("\(neoVimAutoCommandEventName(event)) -> \(bufferHandle)")
self.bridgeLogger.debug("\(neoVimAutoCommandEventName(event)) -> \(bufferHandle)")
if event == .BUFWINENTER || event == .BUFWINLEAVE {
self.bufferListChanged()
@ -207,6 +206,10 @@ extension NeoVimView {
if event == .BUFREADPOST || event == .BUFWRITEPOST {
self.currentBufferChanged(bufferHandle)
}
if event == .VIMLEAVE {
self.agent.quit()
}
}
}