Patch 7.4.139
Problem:    Crash when using :cd in autocommand. (François Ingelrest)
Solution:   Set w_localdir to NULL after freeing it. (Dominique Pelle)
Files:      src/ex_docmd.c, src/window.c


*** ../vim-7.4.138/src/ex_docmd.c       2013-12-14 13:06:13.000000000 +0100
--- src/ex_docmd.c      2014-01-10 15:39:58.000000000 +0100
***************
*** 8228,8233 ****
--- 8228,8234 ----
      int               local;
  {
      vim_free(curwin->w_localdir);
+     curwin->w_localdir = NULL;
      if (local)
      {
        /* If still in global directory, need to remember current
***************
*** 8244,8250 ****
         * name. */
        vim_free(globaldir);
        globaldir = NULL;
-       curwin->w_localdir = NULL;
      }
  
      shorten_fnames(TRUE);
--- 8245,8250 ----
*** ../vim-7.4.138/src/window.c 2013-08-14 17:11:14.000000000 +0200
--- src/window.c        2014-01-10 15:39:58.000000000 +0100
***************
*** 1216,1223 ****
      else
        copy_loclist(oldp, newp);
  #endif
!     if (oldp->w_localdir != NULL)
!       newp->w_localdir = vim_strsave(oldp->w_localdir);
  
      /* copy tagstack and folds */
      for (i = 0; i < oldp->w_tagstacklen; i++)
--- 1216,1223 ----
      else
        copy_loclist(oldp, newp);
  #endif
!     newp->w_localdir = (oldp->w_localdir == NULL)
!                                   ? NULL : vim_strsave(oldp->w_localdir);
  
      /* copy tagstack and folds */
      for (i = 0; i < oldp->w_tagstacklen; i++)
*** ../vim-7.4.138/src/version.c        2014-01-10 15:32:17.000000000 +0100
--- src/version.c       2014-01-10 15:39:48.000000000 +0100
***************
*** 740,741 ****
--- 740,743 ----
  {   /* Add new patch number below this line */
+ /**/
+     139,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
132. You come back and check this list every half-hour.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui