vim-patch:9.0.1238: :runtime completion can be further improved

Problem:    :runtime completion can be further improved.
Solution:   Also complete the {where} argument values and adjust the
            completion for that. (closes vim/vim#11874)

5c8771bc5a
This commit is contained in:
zeertzjq
2023-01-26 10:38:53 +08:00
parent 6320c91c50
commit f03f6263bb
5 changed files with 149 additions and 103 deletions

View File

@@ -2718,9 +2718,6 @@ static int ExpandFromContext(expand_T *xp, char *pat, char ***matches, int *numM
char *directories[] = { "colors", NULL };
return ExpandRTDir(pat, DIP_START + DIP_OPT, numMatches, matches, directories);
}
if (xp->xp_context == EXPAND_RUNTIME) {
return expand_runtime_cmd(pat, numMatches, matches);
}
if (xp->xp_context == EXPAND_COMPILER) {
char *directories[] = { "compiler", NULL };
return ExpandRTDir(pat, 0, numMatches, matches, directories);
@@ -2742,6 +2739,9 @@ static int ExpandFromContext(expand_T *xp, char *pat, char ***matches, int *numM
if (xp->xp_context == EXPAND_PACKADD) {
return ExpandPackAddDir(pat, numMatches, matches);
}
if (xp->xp_context == EXPAND_RUNTIME) {
return expand_runtime_cmd(pat, numMatches, matches);
}
// When expanding a function name starting with s:, match the <SNR>nr_
// prefix.