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:
parent
0d6f45ab67
commit
2a3eeda594
@ -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()
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user