1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-24 19:47:41 +03:00

GH-491 Exit full screen when closing the window to avoid crashes

This commit is contained in:
Tae Won Ha 2017-08-23 17:38:54 +02:00
parent 25ae0a3f87
commit 7005c4baa4
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -410,6 +410,13 @@ extension MainWindow {
func neoVimStopped() { func neoVimStopped() {
self.isClosing = true self.isClosing = true
// If we close the window in the full screen mode, either by clicking the close button or by invoking :q
// the main thread crashes. We exit the full screen mode here as a quick and dirty hack.
if self.window.styleMask.contains(.fullScreen) {
self.window.toggleFullScreen(nil)
}
self.windowController.close() self.windowController.close()
self.set(dirtyStatus: false) self.set(dirtyStatus: false)
self.emit(self.uuidAction(for: .close)) self.emit(self.uuidAction(for: .close))