1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-29 16:56:40 +03:00

Wait for closing

This commit is contained in:
Tae Won Ha 2019-02-02 18:35:42 +01:00
parent 0d6f45ab67
commit 2a3eeda594
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -144,7 +144,7 @@ extension MainWindow {
func windowShouldClose(_: NSWindow) -> Bool {
guard (self.neoVimView.isCurrentBufferDirty().syncValue() ?? false) else {
self.neoVimView.closeCurrentTab().trigger()
try? self.neoVimView.closeCurrentTab().wait()
return false
}
@ -157,7 +157,7 @@ extension MainWindow {
discardAndCloseButton.keyEquivalent = "d"
alert.beginSheetModal(for: self.window, completionHandler: { response in
if response == .alertSecondButtonReturn {
self.neoVimView.closeCurrentTabWithoutSaving().trigger()
try? self.neoVimView.closeCurrentTabWithoutSaving().wait()
}
})