]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.857 v7.3.857
authorBram Moolenaar <Bram@vim.org>
Wed, 13 Mar 2013 17:30:43 +0000 (18:30 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 13 Mar 2013 17:30:43 +0000 (18:30 +0100)
Problem:    The QuitPre autocommand event does not trigger for :qa and :wq.
Solution:   Trigger the event. (Tatsuro Fujii)

src/ex_docmd.c
src/version.c

index 89b523495d1c379b1fc388d3b366d604e3b2300f..d258e69e7b6a6009b3191b07a3564cfc6ec77463 100644 (file)
@@ -6526,7 +6526,7 @@ ex_quit(eap)
     }
 #ifdef FEAT_AUTOCMD
     apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
-    /* Refuse to quick when locked or when the buffer in the last window is
+    /* Refuse to quit when locked or when the buffer in the last window is
      * being closed (can only happen in autocommands). */
     if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
        return;
@@ -6600,7 +6600,10 @@ ex_quit_all(eap)
        return;
     }
 #ifdef FEAT_AUTOCMD
-    if (curbuf_locked())
+    apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
+    /* Refuse to quit when locked or when the buffer in the last window is
+     * being closed (can only happen in autocommands). */
+    if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
        return;
 #endif
 
@@ -6936,7 +6939,10 @@ ex_exit(eap)
        return;
     }
 #ifdef FEAT_AUTOCMD
-    if (curbuf_locked())
+    apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
+    /* Refuse to quit when locked or when the buffer in the last window is
+     * being closed (can only happen in autocommands). */
+    if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
        return;
 #endif
 
index 90d7a4a26328bee1bf72d9ddbe6e70d554eefad9..f865b72a7dd50e17d9b0f3cee1dfb2f1adb4eea0 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    857,
 /**/
     856,
 /**/