mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
commit
0bb1008e7f
@ -2502,10 +2502,10 @@ static char_u *find_command(exarg_T *eap, int *full)
|
|||||||
static char_u *
|
static char_u *
|
||||||
find_ucmd (
|
find_ucmd (
|
||||||
exarg_T *eap,
|
exarg_T *eap,
|
||||||
char_u *p, /* end of the command (possibly including count) */
|
char_u *p, // end of the command (possibly including count)
|
||||||
int *full, /* set to TRUE for a full match */
|
int *full, // set to TRUE for a full match
|
||||||
expand_T *xp, /* used for completion, NULL otherwise */
|
expand_T *xp, // used for completion, NULL otherwise
|
||||||
int *compl /* completion flags or NULL */
|
int *complp // completion flags or NULL
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int len = (int)(p - eap->cmd);
|
int len = (int)(p - eap->cmd);
|
||||||
@ -2558,8 +2558,9 @@ find_ucmd (
|
|||||||
eap->useridx = j;
|
eap->useridx = j;
|
||||||
eap->addr_type = uc->uc_addr_type;
|
eap->addr_type = uc->uc_addr_type;
|
||||||
|
|
||||||
if (compl != NULL)
|
if (complp != NULL) {
|
||||||
*compl = uc->uc_compl;
|
*complp = uc->uc_compl;
|
||||||
|
}
|
||||||
if (xp != NULL) {
|
if (xp != NULL) {
|
||||||
xp->xp_arg = uc->uc_compl_arg;
|
xp->xp_arg = uc->uc_compl_arg;
|
||||||
xp->xp_scriptID = uc->uc_scriptID;
|
xp->xp_scriptID = uc->uc_scriptID;
|
||||||
@ -5087,7 +5088,7 @@ static void uc_list(char_u *name, size_t name_len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int uc_scan_attr(char_u *attr, size_t len, uint32_t *argt, long *def,
|
static int uc_scan_attr(char_u *attr, size_t len, uint32_t *argt, long *def,
|
||||||
int *flags, int * compl, char_u **compl_arg,
|
int *flags, int *complp, char_u **compl_arg,
|
||||||
int *addr_type_arg)
|
int *addr_type_arg)
|
||||||
{
|
{
|
||||||
char_u *p;
|
char_u *p;
|
||||||
@ -5184,9 +5185,10 @@ invalid_count:
|
|||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parse_compl_arg(val, (int)vallen, compl, argt, compl_arg)
|
if (parse_compl_arg(val, (int)vallen, complp, argt, compl_arg)
|
||||||
== FAIL)
|
== FAIL) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
}
|
||||||
} else if (STRNICMP(attr, "addr", attrlen) == 0) {
|
} else if (STRNICMP(attr, "addr", attrlen) == 0) {
|
||||||
*argt |= RANGE;
|
*argt |= RANGE;
|
||||||
if (val == NULL) {
|
if (val == NULL) {
|
||||||
|
@ -477,3 +477,12 @@ func Test_large_arg()
|
|||||||
exe 'argadd ' .repeat('x', &columns)
|
exe 'argadd ' .repeat('x', &columns)
|
||||||
args
|
args
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_argdo()
|
||||||
|
next! Xa.c Xb.c Xc.c
|
||||||
|
new
|
||||||
|
let l = []
|
||||||
|
argdo call add(l, expand('%'))
|
||||||
|
call assert_equal(['Xa.c', 'Xb.c', 'Xc.c'], l)
|
||||||
|
bwipe Xa.c Xb.c Xc.c
|
||||||
|
endfunc
|
||||||
|
Loading…
Reference in New Issue
Block a user