mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-29 16:56:40 +03:00
GH-512 Quit the agent when VIMLEAVE event is fired
This commit is contained in:
parent
65cec4e1fb
commit
0c20cebfe6
@ -187,14 +187,13 @@ extension NeoVimView {
|
|||||||
self.quitNeoVimCondition.unlock()
|
self.quitNeoVimCondition.unlock()
|
||||||
|
|
||||||
gui.async {
|
gui.async {
|
||||||
self.agent.quit()
|
|
||||||
self.delegate?.neoVimStopped()
|
self.delegate?.neoVimStopped()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func autoCommandEvent(_ event: NeoVimAutoCommandEvent, bufferHandle: Int) {
|
public func autoCommandEvent(_ event: NeoVimAutoCommandEvent, bufferHandle: Int) {
|
||||||
gui.async {
|
gui.async {
|
||||||
// self.bridgeLogger.debug("\(neoVimAutoCommandEventName(event)) -> \(bufferHandle)")
|
self.bridgeLogger.debug("\(neoVimAutoCommandEventName(event)) -> \(bufferHandle)")
|
||||||
|
|
||||||
if event == .BUFWINENTER || event == .BUFWINLEAVE {
|
if event == .BUFWINENTER || event == .BUFWINLEAVE {
|
||||||
self.bufferListChanged()
|
self.bufferListChanged()
|
||||||
@ -207,6 +206,10 @@ extension NeoVimView {
|
|||||||
if event == .BUFREADPOST || event == .BUFWRITEPOST {
|
if event == .BUFREADPOST || event == .BUFWRITEPOST {
|
||||||
self.currentBufferChanged(bufferHandle)
|
self.currentBufferChanged(bufferHandle)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if event == .VIMLEAVE {
|
||||||
|
self.agent.quit()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user