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.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 0e6d759..d3ef15e 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -1822,7 +1822,11 @@
{
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)))
{