1
0
forked from aniani/vim

updated for version 7.1-195

This commit is contained in:
Bram Moolenaar
2008-01-03 19:22:13 +00:00
parent b238909e06
commit 525ad4d05f
2 changed files with 19 additions and 2 deletions

View File

@@ -505,9 +505,24 @@ fname2fnum(fm)
{
/*
* First expand "~/" in the file name to the home directory.
* Try to shorten the file name.
* Don't expand the whole name, it may contain other '~' chars.
*/
expand_env(fm->fname, NameBuff, MAXPATHL);
if (fm->fname[0] == '~' && (fm->fname[1] == '/'
#ifdef BACKSLASH_IN_FILENAME
|| fm->fname[1] == '\\'
#endif
))
{
int len;
expand_env((char_u *)"~/", NameBuff, MAXPATHL);
len = STRLEN(NameBuff);
vim_strncpy(NameBuff + len, fm->fname + 2, MAXPATHL - len - 1);
}
else
vim_strncpy(NameBuff, fm->fname, MAXPATHL - 1);
/* Try to shorten the file name. */
mch_dirname(IObuff, IOSIZE);
p = shorten_fname(NameBuff, IObuff);

View File

@@ -666,6 +666,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
195,
/**/
194,
/**/