]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.544 v7.3.544
authorBram Moolenaar <Bram@vim.org>
Wed, 6 Jun 2012 16:03:07 +0000 (18:03 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 6 Jun 2012 16:03:07 +0000 (18:03 +0200)
Problem:    There is no good way to close a quickfix window when closing the
            last ordinary window.
Solution:   Add the QuitPre autocommand.

src/ex_docmd.c
src/fileio.c
src/version.c
src/vim.h

index c1640a318317cd47c92de985d9bd3504050ae6a4..8d9ceb77b584021214442ddcb5240b7edd22e4d3 100644 (file)
@@ -6458,6 +6458,7 @@ ex_quit(eap)
        return;
     }
 #ifdef FEAT_AUTOCMD
+    apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
     if (curbuf_locked())
        return;
 #endif
index 6fe112745438f98b7c6d16befab5c74a3b11ab2b..0781424689af92c1726b17e92be76eb6d65f0196 100644 (file)
@@ -7678,6 +7678,7 @@ static struct event_name
     {"MenuPopup",      EVENT_MENUPOPUP},
     {"QuickFixCmdPost",        EVENT_QUICKFIXCMDPOST},
     {"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE},
+    {"QuitPre",                EVENT_QUITPRE},
     {"RemoteReply",    EVENT_REMOTEREPLY},
     {"SessionLoadPost",        EVENT_SESSIONLOADPOST},
     {"ShellCmdPost",   EVENT_SHELLCMDPOST},
index 9a573a0a6946c4296c519ca47f6cbb1eca634bba..8f98f51feb4c4f0ef3bc901f6a17125260274fcc 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    544,
 /**/
     543,
 /**/
index d63551d8afc3c2d037d59cde1af1c6be8720a97f..41aba5d85df737bc078f7380439b9b147ca4a305 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -1264,8 +1264,9 @@ enum auto_event
     EVENT_INSERTENTER,         /* when entering Insert mode */
     EVENT_INSERTLEAVE,         /* when leaving Insert mode */
     EVENT_MENUPOPUP,           /* just before popup menu is displayed */
-    EVENT_QUICKFIXCMDPOST,     /* after :make, :grep etc */
-    EVENT_QUICKFIXCMDPRE,      /* before :make, :grep etc */
+    EVENT_QUICKFIXCMDPOST,     /* after :make, :grep etc. */
+    EVENT_QUICKFIXCMDPRE,      /* before :make, :grep etc. */
+    EVENT_QUITPRE,             /* before :quit */
     EVENT_SESSIONLOADPOST,     /* after loading a session file */
     EVENT_STDINREADPOST,       /* after reading from stdin */
     EVENT_STDINREADPRE,                /* before reading from stdin */