0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.2341: expresison command line completion incomplete after "g:"

Problem:    Expresison command line completion shows variables but not
            functions after "g:". (Gary Johnson)
Solution:   Prefix "g:" when needed to a global function.
This commit is contained in:
Bram Moolenaar
2021-01-13 19:48:46 +01:00
parent 37487e16da
commit 1bb4de5302
5 changed files with 12 additions and 1 deletions

View File

@@ -1822,7 +1822,11 @@ get_function_name(expand_T *xp, int idx)
{
name = get_user_func_name(xp, idx);
if (name != NULL)
{
if (*name != '<' && STRNCMP("g:", xp->xp_pattern, 2) == 0)
return cat_prefix_varname('g', name);
return name;
}
}
if (++intidx < (int)(sizeof(global_functions) / sizeof(funcentry_T)))
{