summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-06-06 18:03:07 +0200
committerBram Moolenaar <Bram@vim.org>2012-06-06 18:03:07 +0200
commit3b53dfb3b0743af7d6ae381a766e1bb2018fd01e (patch)
tree41df451925805c0f5e3fa03fa55e7fd252ae7c42
parentab984db2969c3f522eb4da694a954cbe6cec7797 (diff)
updated for version 7.3.544v7.3.544
Problem: There is no good way to close a quickfix window when closing the last ordinary window. Solution: Add the QuitPre autocommand.
-rw-r--r--src/ex_docmd.c1
-rw-r--r--src/fileio.c1
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h5
4 files changed, 7 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index c1640a3183..8d9ceb77b5 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -6458,6 +6458,7 @@ ex_quit(eap)
return;
}
#ifdef FEAT_AUTOCMD
+ apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
if (curbuf_locked())
return;
#endif
diff --git a/src/fileio.c b/src/fileio.c
index 6fe1127454..0781424689 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -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},
diff --git a/src/version.c b/src/version.c
index 9a573a0a69..8f98f51feb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 544,
+/**/
543,
/**/
542,
diff --git a/src/vim.h b/src/vim.h
index d63551d8af..41aba5d85d 100644
--- 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 */