forked from aniani/vim
patch 9.0.1734: :runtime completion fails for multiple args
Problem: :runtime completion fails for multiple args Solution: Make it work closes: #12616 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
committed by
Christian Brabandt
parent
d2af6c66fe
commit
be5cdd1d63
@@ -289,6 +289,15 @@ set_context_in_runtime_cmd(expand_T *xp, char_u *arg)
|
||||
char_u *p = skiptowhite(arg);
|
||||
runtime_expand_flags
|
||||
= *p != NUL ? get_runtime_cmd_flags(&arg, p - arg) : 0;
|
||||
// Skip to the last argument.
|
||||
while (*(p = skiptowhite_esc(arg)) != NUL)
|
||||
{
|
||||
if (runtime_expand_flags == 0)
|
||||
// When there are multiple arguments and [where] is not specified,
|
||||
// use an unrelated non-zero flag to avoid expanding [where].
|
||||
runtime_expand_flags = DIP_ALL;
|
||||
arg = skipwhite(p);
|
||||
}
|
||||
xp->xp_context = EXPAND_RUNTIME;
|
||||
xp->xp_pattern = arg;
|
||||
}
|
||||
|
Reference in New Issue
Block a user