0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.3.1180

Problem:    When current directory changes, path from cscope may no longer be
            valid. (AS Budden)
Solution:   Always store the absolute path. (Christian Brabandt)
This commit is contained in:
Bram Moolenaar
2013-06-12 21:25:23 +02:00
parent 0825c00f14
commit cab465a6d7
2 changed files with 17 additions and 0 deletions

View File

@@ -539,12 +539,27 @@ cs_add_common(arg1, arg2, flags)
char *fname2 = NULL; char *fname2 = NULL;
char *ppath = NULL; char *ppath = NULL;
int i; int i;
#ifdef FEAT_MODIFY_FNAME
int len;
int usedlen = 0;
char_u *fbuf = NULL;
#endif
/* get the filename (arg1), expand it, and try to stat it */ /* get the filename (arg1), expand it, and try to stat it */
if ((fname = (char *)alloc(MAXPATHL + 1)) == NULL) if ((fname = (char *)alloc(MAXPATHL + 1)) == NULL)
goto add_err; goto add_err;
expand_env((char_u *)arg1, (char_u *)fname, MAXPATHL); expand_env((char_u *)arg1, (char_u *)fname, MAXPATHL);
#ifdef FEAT_MODIFY_FNAME
len = (int)STRLEN(fname);
fbuf = (char_u *)fname;
(void)modify_fname((char_u *)":p", &usedlen,
(char_u **)&fname, &fbuf, &len);
if (fname == NULL)
goto add_err;
fname = (char *)vim_strnsave((char_u *)fname, len);
vim_free(fbuf);
#endif
ret = stat(fname, &statbuf); ret = stat(fname, &statbuf);
if (ret < 0) if (ret < 0)
{ {

View File

@@ -728,6 +728,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 */
/**/
1180,
/**/ /**/
1179, 1179,
/**/ /**/