To: vim_dev@googlegroups.com
Subject: Patch 7.3.544
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.544
Problem:    There is no good way to close a quickfix window when closing the
	    last ordinary window.
Solution:   Add the QuitPre autocommand.
Files:	    src/ex_docmd.c, src/fileio.c, src/vim.h


*** ../vim-7.3.543/src/ex_docmd.c	2012-06-06 16:12:54.000000000 +0200
--- src/ex_docmd.c	2012-06-06 17:58:41.000000000 +0200
***************
*** 6458,6463 ****
--- 6458,6464 ----
  	return;
      }
  #ifdef FEAT_AUTOCMD
+     apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
      if (curbuf_locked())
  	return;
  #endif
*** ../vim-7.3.543/src/fileio.c	2012-04-30 17:04:47.000000000 +0200
--- src/fileio.c	2012-06-06 17:32:12.000000000 +0200
***************
*** 7678,7683 ****
--- 7678,7684 ----
      {"MenuPopup",	EVENT_MENUPOPUP},
      {"QuickFixCmdPost",	EVENT_QUICKFIXCMDPOST},
      {"QuickFixCmdPre",	EVENT_QUICKFIXCMDPRE},
+     {"QuitPre",		EVENT_QUITPRE},
      {"RemoteReply",	EVENT_REMOTEREPLY},
      {"SessionLoadPost",	EVENT_SESSIONLOADPOST},
      {"ShellCmdPost",	EVENT_SHELLCMDPOST},
*** ../vim-7.3.543/src/vim.h	2012-06-01 15:20:49.000000000 +0200
--- src/vim.h	2012-06-06 17:30:01.000000000 +0200
***************
*** 1264,1271 ****
      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_SESSIONLOADPOST,	/* after loading a session file */
      EVENT_STDINREADPOST,	/* after reading from stdin */
      EVENT_STDINREADPRE,		/* before reading from stdin */
--- 1264,1272 ----
      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_QUITPRE,		/* before :quit */
      EVENT_SESSIONLOADPOST,	/* after loading a session file */
      EVENT_STDINREADPOST,	/* after reading from stdin */
      EVENT_STDINREADPRE,		/* before reading from stdin */
*** ../vim-7.3.543/src/version.c	2012-06-06 16:29:06.000000000 +0200
--- src/version.c	2012-06-06 18:02:09.000000000 +0200
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     544,
  /**/

-- 
How To Keep A Healthy Level Of Insanity:
3. Every time someone asks you to do something, ask if they want fries
   with that.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
