1
0
forked from aniani/vim

updated for version 7.1-081

This commit is contained in:
Bram Moolenaar
2007-08-18 15:47:34 +00:00
parent 7baa45dbbf
commit 6529c101c3
2 changed files with 45 additions and 18 deletions

View File

@@ -3281,6 +3281,7 @@ set_one_cmd_context(xp, buff)
if (ea.argt & XFILE) if (ea.argt & XFILE)
{ {
int c;
int in_quote = FALSE; int in_quote = FALSE;
char_u *bow = NULL; /* Beginning of word */ char_u *bow = NULL; /* Beginning of word */
@@ -3289,24 +3290,18 @@ set_one_cmd_context(xp, buff)
* being expanded. * being expanded.
*/ */
xp->xp_pattern = skipwhite(arg); xp->xp_pattern = skipwhite(arg);
for (p = xp->xp_pattern; *p; ) p = xp->xp_pattern;
while (*p != NUL)
{ {
if (*p == '\\' && p[1] != NUL) #ifdef FEAT_MBYTE
++p; if (has_mbyte)
#ifdef SPACE_IN_FILENAME c = mb_ptr2char(p);
else if (vim_iswhite(*p) && (!(ea.argt & NOSPC) || usefilter))
#else
else if (vim_iswhite(*p))
#endif
{
p = skipwhite(p);
if (in_quote)
bow = p;
else else
xp->xp_pattern = p; #endif
--p; c = *p;
} if (c == '\\' && p[1] != NUL)
else if (*p == '`') ++p;
else if (c == '`')
{ {
if (!in_quote) if (!in_quote)
{ {
@@ -3315,6 +3310,36 @@ set_one_cmd_context(xp, buff)
} }
in_quote = !in_quote; in_quote = !in_quote;
} }
#ifdef SPACE_IN_FILENAME
else if (!vim_isfilec(c) && (!(ea.argt & NOSPC) || usefilter))
#else
else if (!vim_isfilec(c))
#endif
{
while (*p != NUL)
{
#ifdef FEAT_MBYTE
if (has_mbyte)
c = mb_ptr2char(p);
else
#endif
c = *p;
if (c == '`' || vim_isfilec(c))
break;
#ifdef FEAT_MBYTE
if (has_mbyte)
len = (*mb_ptr2len)(p);
else
#endif
len = 1;
mb_ptr_adv(p);
}
if (in_quote)
bow = p;
else
xp->xp_pattern = p;
p -= len;
}
mb_ptr_adv(p); mb_ptr_adv(p);
} }

View File

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