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 #11874)
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index 17f3878..8ca5ecd 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -3025,10 +3025,6 @@
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};
@@ -3050,6 +3046,8 @@
#endif
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.