mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
vim-patch:9.0.1734: :runtime completion fails for multiple args (#24767)
Problem: :runtime completion fails for multiple args
Solution: Make it work
closes: vim/vim#12616
be5cdd1d63
This commit is contained in:
@@ -265,6 +265,15 @@ void set_context_in_runtime_cmd(expand_T *xp, const char *arg)
|
||||
char *p = skiptowhite(arg);
|
||||
runtime_expand_flags
|
||||
= *p != NUL ? get_runtime_cmd_flags((char **)&arg, (size_t)(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 = (char *)arg;
|
||||
}
|
||||
|
Reference in New Issue
Block a user