1
0
forked from aniani/vim

updated for version 7.3.857

Problem:    The QuitPre autocommand event does not trigger for :qa and :wq.
Solution:   Trigger the event. (Tatsuro Fujii)
This commit is contained in:
Bram Moolenaar
2013-03-13 18:30:43 +01:00
parent 1a0316ca2a
commit 4f8301f641
2 changed files with 11 additions and 3 deletions

View 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