forked from aniani/vim
updated for version 7.2-090
This commit is contained in:
@@ -5482,6 +5482,9 @@ invalid_count:
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ":command ..."
|
||||||
|
*/
|
||||||
static void
|
static void
|
||||||
ex_command(eap)
|
ex_command(eap)
|
||||||
exarg_T *eap;
|
exarg_T *eap;
|
||||||
@@ -5914,6 +5917,7 @@ do_ucmd(eap)
|
|||||||
|
|
||||||
char_u *start;
|
char_u *start;
|
||||||
char_u *end;
|
char_u *end;
|
||||||
|
char_u *ksp;
|
||||||
size_t len, totlen;
|
size_t len, totlen;
|
||||||
|
|
||||||
size_t split_len = 0;
|
size_t split_len = 0;
|
||||||
@@ -5930,16 +5934,51 @@ do_ucmd(eap)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Replace <> in the command by the arguments.
|
* Replace <> in the command by the arguments.
|
||||||
|
* First round: "buf" is NULL, compute length, allocate "buf".
|
||||||
|
* Second round: copy result into "buf".
|
||||||
*/
|
*/
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
p = cmd->uc_rep;
|
p = cmd->uc_rep; /* source */
|
||||||
q = buf;
|
q = buf; /* destinateion */
|
||||||
totlen = 0;
|
totlen = 0;
|
||||||
while ((start = vim_strchr(p, '<')) != NULL
|
|
||||||
&& (end = vim_strchr(start + 1, '>')) != NULL)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
start = vim_strchr(p, '<');
|
||||||
|
if (start != NULL)
|
||||||
|
end = vim_strchr(start + 1, '>');
|
||||||
|
if (buf != NULL)
|
||||||
|
{
|
||||||
|
ksp = vim_strchr(p, K_SPECIAL);
|
||||||
|
if (ksp != NULL && (start == NULL || ksp < start || end == NULL)
|
||||||
|
&& ((ksp[1] == KS_SPECIAL && ksp[2] == KE_FILLER)
|
||||||
|
# ifdef FEAT_GUI
|
||||||
|
|| (ksp[1] == KS_EXTRA && ksp[2] == (int)KE_CSI)
|
||||||
|
# endif
|
||||||
|
))
|
||||||
|
{
|
||||||
|
/* K_SPECIAL han been put in the buffer as K_SPECIAL
|
||||||
|
* KS_SPECIAL KE_FILLER, like for mappings, but
|
||||||
|
* do_cmdline() doesn't handle that, so convert it back.
|
||||||
|
* Also change K_SPECIAL KS_EXTRA KE_CSI into CSI. */
|
||||||
|
len = ksp - p;
|
||||||
|
if (len > 0)
|
||||||
|
{
|
||||||
|
mch_memmove(q, p, len);
|
||||||
|
q += len;
|
||||||
|
}
|
||||||
|
*q++ = ksp[1] == KS_SPECIAL ? K_SPECIAL : CSI;
|
||||||
|
p = ksp + 3;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* break if there no <item> is found */
|
||||||
|
if (start == NULL || end == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
/* Include the '>' */
|
/* Include the '>' */
|
||||||
++end;
|
++end;
|
||||||
|
|
||||||
|
@@ -676,6 +676,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 */
|
||||||
|
/**/
|
||||||
|
90,
|
||||||
/**/
|
/**/
|
||||||
89,
|
89,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user