aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/cmdexpand.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c
index 5421e9dd5c..33ccc834d2 100644
--- a/src/nvim/cmdexpand.c
+++ b/src/nvim/cmdexpand.c
@@ -242,7 +242,12 @@ int nextwild(expand_T *xp, int type, int options, bool escape)
char *p2;
if (xp->xp_numfiles == -1) {
- set_expand_context(xp);
+ if (ccline->input_fn && ccline->xp_context == EXPAND_COMMANDS) {
+ // Expand commands typed in input() function
+ set_cmd_context(xp, ccline->cmdbuff, ccline->cmdlen, ccline->cmdpos, false);
+ } else {
+ set_expand_context(xp);
+ }
if (xp->xp_context == EXPAND_LUA) {
nlua_expand_pat(xp);
}