Mercurial > vim
diff src/ex_getln.c @ 1754:28d0c20ad8a0 v7.2.051
updated for version 7.2-051
author | vimboss |
---|---|
date | Fri, 28 Nov 2008 10:01:10 +0000 |
parents | 734d5bdae499 |
children | eb1ce51c1cb0 |
line wrap: on
line diff
--- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -2524,7 +2524,7 @@ realloc_cmdbuff(len) && ccline.xpc->xp_context != EXPAND_NOTHING && ccline.xpc->xp_context != EXPAND_UNSUCCESSFUL) { - int i = ccline.xpc->xp_pattern - p; + int i = (int)(ccline.xpc->xp_pattern - p); /* If xp_pattern points inside the old cmdbuff it needs to be adjusted * to point into the newly allocated memory. */ @@ -4897,7 +4897,7 @@ ExpandRTDir(pat, num_file, file, dirname if (s == NULL) return FAIL; sprintf((char *)s, "%s/%s*.vim", dirname, pat); - all = globpath(p_rtp, s); + all = globpath(p_rtp, s, 0); vim_free(s); if (all == NULL) return FAIL; @@ -4938,9 +4938,10 @@ ExpandRTDir(pat, num_file, file, dirname * newlines. Returns NULL for an error or no matches. */ char_u * -globpath(path, file) +globpath(path, file, expand_options) char_u *path; char_u *file; + int expand_options; { expand_T xpc; char_u *buf; @@ -4969,10 +4970,10 @@ globpath(path, file) { add_pathsep(buf); STRCAT(buf, file); - if (ExpandFromContext(&xpc, buf, &num_p, &p, WILD_SILENT) != FAIL - && num_p > 0) + if (ExpandFromContext(&xpc, buf, &num_p, &p, + WILD_SILENT|expand_options) != FAIL && num_p > 0) { - ExpandEscape(&xpc, buf, num_p, p, WILD_SILENT); + ExpandEscape(&xpc, buf, num_p, p, WILD_SILENT|expand_options); for (len = 0, i = 0; i < num_p; ++i) len += (int)STRLEN(p[i]) + 1;