mirror of
https://github.com/vim/vim.git
synced 2025-08-23 19:34:27 -04:00
updated for version 7.4.139
Problem: Crash when using :cd in autocommand. (François Ingelrest) Solution: Set w_localdir to NULL after freeing it. (Dominique Pelle)
This commit is contained in:
parent
4ea924e0a5
commit
bd2dc34774
@ -8228,6 +8228,7 @@ post_chdir(local)
|
|||||||
int local;
|
int local;
|
||||||
{
|
{
|
||||||
vim_free(curwin->w_localdir);
|
vim_free(curwin->w_localdir);
|
||||||
|
curwin->w_localdir = NULL;
|
||||||
if (local)
|
if (local)
|
||||||
{
|
{
|
||||||
/* If still in global directory, need to remember current
|
/* If still in global directory, need to remember current
|
||||||
@ -8244,7 +8245,6 @@ post_chdir(local)
|
|||||||
* name. */
|
* name. */
|
||||||
vim_free(globaldir);
|
vim_free(globaldir);
|
||||||
globaldir = NULL;
|
globaldir = NULL;
|
||||||
curwin->w_localdir = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
shorten_fnames(TRUE);
|
shorten_fnames(TRUE);
|
||||||
|
@ -738,6 +738,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
139,
|
||||||
/**/
|
/**/
|
||||||
138,
|
138,
|
||||||
/**/
|
/**/
|
||||||
|
@ -1216,8 +1216,8 @@ win_init(newp, oldp, flags)
|
|||||||
else
|
else
|
||||||
copy_loclist(oldp, newp);
|
copy_loclist(oldp, newp);
|
||||||
#endif
|
#endif
|
||||||
if (oldp->w_localdir != NULL)
|
newp->w_localdir = (oldp->w_localdir == NULL)
|
||||||
newp->w_localdir = vim_strsave(oldp->w_localdir);
|
? NULL : vim_strsave(oldp->w_localdir);
|
||||||
|
|
||||||
/* copy tagstack and folds */
|
/* copy tagstack and folds */
|
||||||
for (i = 0; i < oldp->w_tagstacklen; i++)
|
for (i = 0; i < oldp->w_tagstacklen; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user