0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.1714: getcompletion() "cmdline" fails after :autocmd

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

closes: #12804

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
zeertzjq
2023-08-15 22:41:53 +02:00
committed by Christian Brabandt
parent ba913b14dd
commit e4c79d3615
4 changed files with 14 additions and 12 deletions

View File

@@ -329,11 +329,7 @@ set_context_in_user_cmdarg(
return set_context_in_menu_cmd(xp, cmd, arg, forceit);
#endif
if (context == EXPAND_COMMANDS)
{
if (xp->xp_context == EXPAND_NOTHING)
xp->xp_context = context;
return arg;
}
if (context == EXPAND_MAPPINGS)
return set_context_in_map_cmd(xp, (char_u *)"map", arg, forceit, FALSE,
FALSE, CMD_map);