jkunstle / rpms / vim

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