vim-patch:9.0.1714: getcompletion() "cmdline" fails after :autocmd (#24727)

Problem:  getcompletion() "cmdline" fails after :autocmd
Solution: Use set_cmd_context() instead of set_one_cmd_context().

closes: vim/vim#12804

e4c79d3615
This commit is contained in:
zeertzjq
2023-08-16 06:07:01 +08:00
committed by GitHub
parent e72c0cd920
commit 3cd5ef63fd
3 changed files with 14 additions and 12 deletions

View File

@@ -296,9 +296,6 @@ const char *set_context_in_user_cmdarg(const char *cmd FUNC_ATTR_UNUSED, const c
return set_context_in_menu_cmd(xp, cmd, (char *)arg, forceit);
}
if (context == EXPAND_COMMANDS) {
if (xp->xp_context == EXPAND_NOTHING) {
xp->xp_context = context;
}
return arg;
}
if (context == EXPAND_MAPPINGS) {