Karsten Hopp ce9b31
To: vim_dev@googlegroups.com
Karsten Hopp ce9b31
Subject: Patch 7.3.857
Karsten Hopp ce9b31
Fcc: outbox
Karsten Hopp ce9b31
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp ce9b31
Mime-Version: 1.0
Karsten Hopp ce9b31
Content-Type: text/plain; charset=UTF-8
Karsten Hopp ce9b31
Content-Transfer-Encoding: 8bit
Karsten Hopp ce9b31
------------
Karsten Hopp ce9b31
Karsten Hopp ce9b31
Patch 7.3.857
Karsten Hopp ce9b31
Problem:    The QuitPre autocommand event does not trigger for :qa and :wq.
Karsten Hopp ce9b31
Solution:   Trigger the event. (Tatsuro Fujii)
Karsten Hopp ce9b31
Files:	    src/ex_docmd.c
Karsten Hopp ce9b31
Karsten Hopp ce9b31
Karsten Hopp ce9b31
*** ../vim-7.3.856/src/ex_docmd.c	2013-02-26 17:21:15.000000000 +0100
Karsten Hopp ce9b31
--- src/ex_docmd.c	2013-03-13 18:14:56.000000000 +0100
Karsten Hopp ce9b31
***************
Karsten Hopp ce9b31
*** 6526,6532 ****
Karsten Hopp ce9b31
      }
Karsten Hopp ce9b31
  #ifdef FEAT_AUTOCMD
Karsten Hopp ce9b31
      apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
Karsten Hopp ce9b31
!     /* Refuse to quick when locked or when the buffer in the last window is
Karsten Hopp ce9b31
       * being closed (can only happen in autocommands). */
Karsten Hopp ce9b31
      if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
Karsten Hopp ce9b31
  	return;
Karsten Hopp ce9b31
--- 6526,6532 ----
Karsten Hopp ce9b31
      }
Karsten Hopp ce9b31
  #ifdef FEAT_AUTOCMD
Karsten Hopp ce9b31
      apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
Karsten Hopp ce9b31
!     /* Refuse to quit when locked or when the buffer in the last window is
Karsten Hopp ce9b31
       * being closed (can only happen in autocommands). */
Karsten Hopp ce9b31
      if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
Karsten Hopp ce9b31
  	return;
Karsten Hopp ce9b31
***************
Karsten Hopp ce9b31
*** 6600,6606 ****
Karsten Hopp ce9b31
  	return;
Karsten Hopp ce9b31
      }
Karsten Hopp ce9b31
  #ifdef FEAT_AUTOCMD
Karsten Hopp ce9b31
!     if (curbuf_locked())
Karsten Hopp ce9b31
  	return;
Karsten Hopp ce9b31
  #endif
Karsten Hopp ce9b31
  
Karsten Hopp ce9b31
--- 6600,6609 ----
Karsten Hopp ce9b31
  	return;
Karsten Hopp ce9b31
      }
Karsten Hopp ce9b31
  #ifdef FEAT_AUTOCMD
Karsten Hopp ce9b31
!     apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
Karsten Hopp ce9b31
!     /* Refuse to quit when locked or when the buffer in the last window is
Karsten Hopp ce9b31
!      * being closed (can only happen in autocommands). */
Karsten Hopp ce9b31
!     if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
Karsten Hopp ce9b31
  	return;
Karsten Hopp ce9b31
  #endif
Karsten Hopp ce9b31
  
Karsten Hopp ce9b31
***************
Karsten Hopp ce9b31
*** 6936,6942 ****
Karsten Hopp ce9b31
  	return;
Karsten Hopp ce9b31
      }
Karsten Hopp ce9b31
  #ifdef FEAT_AUTOCMD
Karsten Hopp ce9b31
!     if (curbuf_locked())
Karsten Hopp ce9b31
  	return;
Karsten Hopp ce9b31
  #endif
Karsten Hopp ce9b31
  
Karsten Hopp ce9b31
--- 6939,6948 ----
Karsten Hopp ce9b31
  	return;
Karsten Hopp ce9b31
      }
Karsten Hopp ce9b31
  #ifdef FEAT_AUTOCMD
Karsten Hopp ce9b31
!     apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
Karsten Hopp ce9b31
!     /* Refuse to quit when locked or when the buffer in the last window is
Karsten Hopp ce9b31
!      * being closed (can only happen in autocommands). */
Karsten Hopp ce9b31
!     if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
Karsten Hopp ce9b31
  	return;
Karsten Hopp ce9b31
  #endif
Karsten Hopp ce9b31
  
Karsten Hopp ce9b31
*** ../vim-7.3.856/src/version.c	2013-03-13 17:50:20.000000000 +0100
Karsten Hopp ce9b31
--- src/version.c	2013-03-13 18:26:13.000000000 +0100
Karsten Hopp ce9b31
***************
Karsten Hopp ce9b31
*** 730,731 ****
Karsten Hopp ce9b31
--- 730,733 ----
Karsten Hopp ce9b31
  {   /* Add new patch number below this line */
Karsten Hopp ce9b31
+ /**/
Karsten Hopp ce9b31
+     857,
Karsten Hopp ce9b31
  /**/
Karsten Hopp ce9b31
Karsten Hopp ce9b31
-- 
Karsten Hopp ce9b31
The future isn't what it used to be.
Karsten Hopp ce9b31
Karsten Hopp ce9b31
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp ce9b31
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp ce9b31
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp ce9b31
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///