Merge #10683 from janlazo/vim-8.1.1796

vim-patch:8.1.{1237,1796}
This commit is contained in:
Justin M. Keyes 2019-08-03 19:14:47 +02:00 committed by GitHub
commit 0bb1008e7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 9 deletions

View File

@ -2502,10 +2502,10 @@ static char_u *find_command(exarg_T *eap, int *full)
static char_u *
find_ucmd (
exarg_T *eap,
char_u *p, /* end of the command (possibly including count) */
int *full, /* set to TRUE for a full match */
expand_T *xp, /* used for completion, NULL otherwise */
int *compl /* completion flags or NULL */
char_u *p, // end of the command (possibly including count)
int *full, // set to TRUE for a full match
expand_T *xp, // used for completion, NULL otherwise
int *complp // completion flags or NULL
)
{
int len = (int)(p - eap->cmd);
@ -2558,8 +2558,9 @@ find_ucmd (
eap->useridx = j;
eap->addr_type = uc->uc_addr_type;
if (compl != NULL)
*compl = uc->uc_compl;
if (complp != NULL) {
*complp = uc->uc_compl;
}
if (xp != NULL) {
xp->xp_arg = uc->uc_compl_arg;
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,
int *flags, int * compl, char_u **compl_arg,
int *flags, int *complp, char_u **compl_arg,
int *addr_type_arg)
{
char_u *p;
@ -5184,9 +5185,10 @@ invalid_count:
return FAIL;
}
if (parse_compl_arg(val, (int)vallen, compl, argt, compl_arg)
== FAIL)
if (parse_compl_arg(val, (int)vallen, complp, argt, compl_arg)
== FAIL) {
return FAIL;
}
} else if (STRNICMP(attr, "addr", attrlen) == 0) {
*argt |= RANGE;
if (val == NULL) {

View File

@ -477,3 +477,12 @@ func Test_large_arg()
exe 'argadd ' .repeat('x', &columns)
args
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