8b9a1c
To: vim_dev@googlegroups.com
8b9a1c
Subject: Patch 7.4.139
8b9a1c
Fcc: outbox
8b9a1c
From: Bram Moolenaar <Bram@moolenaar.net>
8b9a1c
Mime-Version: 1.0
8b9a1c
Content-Type: text/plain; charset=UTF-8
8b9a1c
Content-Transfer-Encoding: 8bit
8b9a1c
------------
8b9a1c
8b9a1c
Patch 7.4.139
8b9a1c
Problem:    Crash when using :cd in autocommand. (François Ingelrest)
8b9a1c
Solution:   Set w_localdir to NULL after freeing it. (Dominique Pelle)
8b9a1c
Files:	    src/ex_docmd.c, src/window.c
8b9a1c
8b9a1c
8b9a1c
*** ../vim-7.4.138/src/ex_docmd.c	2013-12-14 13:06:13.000000000 +0100
8b9a1c
--- src/ex_docmd.c	2014-01-10 15:39:58.000000000 +0100
8b9a1c
***************
8b9a1c
*** 8228,8233 ****
8b9a1c
--- 8228,8234 ----
8b9a1c
      int		local;
8b9a1c
  {
8b9a1c
      vim_free(curwin->w_localdir);
8b9a1c
+     curwin->w_localdir = NULL;
8b9a1c
      if (local)
8b9a1c
      {
8b9a1c
  	/* If still in global directory, need to remember current
8b9a1c
***************
8b9a1c
*** 8244,8250 ****
8b9a1c
  	 * name. */
8b9a1c
  	vim_free(globaldir);
8b9a1c
  	globaldir = NULL;
8b9a1c
- 	curwin->w_localdir = NULL;
8b9a1c
      }
8b9a1c
  
8b9a1c
      shorten_fnames(TRUE);
8b9a1c
--- 8245,8250 ----
8b9a1c
*** ../vim-7.4.138/src/window.c	2013-08-14 17:11:14.000000000 +0200
8b9a1c
--- src/window.c	2014-01-10 15:39:58.000000000 +0100
8b9a1c
***************
8b9a1c
*** 1216,1223 ****
8b9a1c
      else
8b9a1c
  	copy_loclist(oldp, newp);
8b9a1c
  #endif
8b9a1c
!     if (oldp->w_localdir != NULL)
8b9a1c
! 	newp->w_localdir = vim_strsave(oldp->w_localdir);
8b9a1c
  
8b9a1c
      /* copy tagstack and folds */
8b9a1c
      for (i = 0; i < oldp->w_tagstacklen; i++)
8b9a1c
--- 1216,1223 ----
8b9a1c
      else
8b9a1c
  	copy_loclist(oldp, newp);
8b9a1c
  #endif
8b9a1c
!     newp->w_localdir = (oldp->w_localdir == NULL)
8b9a1c
! 				    ? NULL : vim_strsave(oldp->w_localdir);
8b9a1c
  
8b9a1c
      /* copy tagstack and folds */
8b9a1c
      for (i = 0; i < oldp->w_tagstacklen; i++)
8b9a1c
*** ../vim-7.4.138/src/version.c	2014-01-10 15:32:17.000000000 +0100
8b9a1c
--- src/version.c	2014-01-10 15:39:48.000000000 +0100
8b9a1c
***************
8b9a1c
*** 740,741 ****
8b9a1c
--- 740,743 ----
8b9a1c
  {   /* Add new patch number below this line */
8b9a1c
+ /**/
8b9a1c
+     139,
8b9a1c
  /**/
8b9a1c
8b9a1c
-- 
8b9a1c
hundred-and-one symptoms of being an internet addict:
8b9a1c
132. You come back and check this list every half-hour.
8b9a1c
8b9a1c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
8b9a1c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
8b9a1c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
8b9a1c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///