diff --git a/src/MacVim/MMWindowController.m b/src/MacVim/MMWindowController.m index 0228c8a247..2812d7dfea 100644 --- a/src/MacVim/MMWindowController.m +++ b/src/MacVim/MMWindowController.m @@ -253,6 +253,11 @@ NSMutableArray *buildMenuAddress(NSMenu *menu) [vimView removeFromSuperviewWithoutNeedingDisplay]; [vimView cleanup]; // TODO: is this necessary? + // It is feasible that the user quits before the window controller is + // released, make sure the edit flag is cleared so no warning dialog is + // displayed. + [[self window] setDocumentEdited:NO]; + [[self window] orderOut:self]; }