From 0b573a58e63f43f462e6824080c633bbd1a8a5dd Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 27 Jul 2011 17:31:47 +0200 Subject: updated for version 7.3.264 Problem: When the current directory name contains wildcard characters, such as "foo[with]bar", the tags file can't be found. (Jeremy Erickson) Solution: When searching for matching files also match without expanding wildcards. This is a bit of a hack. --- src/misc2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/misc2.c') diff --git a/src/misc2.c b/src/misc2.c index dfb1fc487..f91a64ace 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -4653,9 +4653,8 @@ vim_findfile_stopdir(buf) { if (r_ptr[0] == '\\' && r_ptr[1] == ';') { - /* overwrite the escape char, - * use STRLEN(r_ptr) to move the trailing '\0' - */ + /* Overwrite the escape char, + * use STRLEN(r_ptr) to move the trailing '\0'. */ STRMOVE(r_ptr, r_ptr + 1); r_ptr++; } @@ -4914,10 +4913,13 @@ vim_findfile(search_ctx_arg) stackp->ffs_filearray_size = 0; } else + /* Add EW_NOTWILD because the expanded path may contain + * wildcard characters that are to be taken literally. + * This is a bit of a hack. */ expand_wildcards((dirptrs[1] == NULL) ? 1 : 2, dirptrs, &stackp->ffs_filearray_size, &stackp->ffs_filearray, - EW_DIR|EW_ADDSLASH|EW_SILENT); + EW_DIR|EW_ADDSLASH|EW_SILENT|EW_NOTWILD); stackp->ffs_filearray_cur = 0; stackp->ffs_stage = 0; -- cgit v1.2.1