jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.139

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