Blob Blame History Raw
To: vim-dev@vim.org
Subject: patch 7.1.004
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.1.004
Problem:    Crash when doing ":next directory". (Raphael Finkel)
Solution:   Do not use "buf", it may be invalid after autocommands.
Files:	    src/ex_cmds.c


*** ../vim-7.1.003/src/ex_cmds.c	Thu May 10 21:24:24 2007
--- src/ex_cmds.c	Mon Jun 18 22:03:56 2007
***************
*** 3367,3373 ****
  		 * was in this window (or another window).  If not used
  		 * before, reset the local window options to the global
  		 * values.  Also restores old folding stuff. */
! 		get_winopts(buf);
  #ifdef FEAT_SPELL
  		did_get_winopts = TRUE;
  #endif
--- 3367,3373 ----
  		 * was in this window (or another window).  If not used
  		 * before, reset the local window options to the global
  		 * values.  Also restores old folding stuff. */
! 		get_winopts(curbuf);
  #ifdef FEAT_SPELL
  		did_get_winopts = TRUE;
  #endif
***************
*** 3649,3656 ****
  #ifdef FEAT_SPELL
      /* If the window options were changed may need to set the spell language.
       * Can only do this after the buffer has been properly setup. */
!     if (did_get_winopts && curwin->w_p_spell && *buf->b_p_spl != NUL)
! 	did_set_spelllang(buf);
  #endif
  
      if (command == NULL)
--- 3649,3656 ----
  #ifdef FEAT_SPELL
      /* If the window options were changed may need to set the spell language.
       * Can only do this after the buffer has been properly setup. */
!     if (did_get_winopts && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
! 	did_set_spelllang(curbuf);
  #endif
  
      if (command == NULL)
*** ../vim-7.1.003/src/version.c	Tue Jun 19 10:09:15 2007
--- src/version.c	Tue Jun 19 11:53:34 2007
***************
*** 668,669 ****
--- 668,671 ----
  {   /* Add new patch number below this line */
+ /**/
+     4,
  /**/

-- 
FIRST HEAD:  Oh! quick! get the sword out I want to cut his head off.
THIRD HEAD:  Oh, cut your own head off.
SECOND HEAD: Yes - do us all a favour.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///