1
0
forked from aniani/vim

updated for version 7.2-051

This commit is contained in:
Bram Moolenaar
2008-11-28 10:01:10 +00:00
parent 3f3766b60d
commit bb5ddda46a
6 changed files with 60 additions and 30 deletions

View File

@@ -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;