diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-02-28 08:23:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-28 08:23:02 +0800 |
commit | 332d596959347f26690111afd3c3b1b750fac464 (patch) | |
tree | 9923cf63c7c926f6aabd6aed66a5ca52f5108896 /src | |
parent | 3eee6f9d631b6c220564ef792c542964ed5e1cb9 (diff) | |
download | rneovim-332d596959347f26690111afd3c3b1b750fac464.tar.gz rneovim-332d596959347f26690111afd3c3b1b750fac464.tar.bz2 rneovim-332d596959347f26690111afd3c3b1b750fac464.zip |
vim-patch:9.1.1157: command completion wrong for input() (#32669)
Problem: command completion wrong for input()
(Cdrman Fu)
Solution: Set commandline completion context explicitly
(Jim Zhou)
fixes vim/vim#16723
closes: vim/vim#16733
https://github.com/vim/vim/commit/3255af850e8bab35c30fce4177bb5ba4a941e6ce
Co-authored-by: Jim Zhou <csd_189@163.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/cmdexpand.c | 7 |
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); } |