From b65d56fffd486f50e40f1cf28e7cf55e3ac9788f Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Tue, 18 Dec 2007 17:37:11 +0100 Subject: [PATCH] Avoid false 'documented edited' warning when quitting If a Vim process is quit using :wq the 'document edited' flag is never cleared, so always clear it during cleanup. --- src/MacVim/MMWindowController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/MacVim/MMWindowController.m b/src/MacVim/MMWindowController.m index 0228c8a2..2812d7df 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]; } -- 2.11.4.GIT