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:
parent
25ae0a3f87
commit
7005c4baa4
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user