1
0
forked from aniani/vim

updated for version 7.2-021

This commit is contained in:
Bram Moolenaar
2008-09-18 19:29:58 +00:00
parent 806875ddb5
commit f6dad43c98
4 changed files with 19 additions and 3 deletions

View File

@@ -9542,6 +9542,15 @@ eval_vars(src, srcstart, usedlen, lnump, errormsg, escaped)
#ifdef FEAT_AUTOCMD
case SPEC_AFILE: /* file name for autocommand */
result = autocmd_fname;
if (result != NULL && !autocmd_fname_full)
{
/* Still need to turn the fname into a full path. It is
* postponed to avoid a delay when <afile> is not used. */
autocmd_fname_full = TRUE;
result = FullName_save(autocmd_fname, FALSE);
vim_free(autocmd_fname);
autocmd_fname = result;
}
if (result == NULL)
{
*errormsg = (char_u *)_("E495: no autocommand file name to substitute for \"<afile>\"");