Blame SOURCES/7.4.139

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