mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
vim-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.
1bb4de5302
Port most of patch v8.2.0335 to complete script-local functions
if the name starts with "s:".
This commit is contained in:
@@ -117,8 +117,12 @@ char_u *get_function_name(expand_T *xp, int idx)
|
||||
intidx = -1;
|
||||
if (intidx < 0) {
|
||||
name = get_user_func_name(xp, idx);
|
||||
if (name != NULL)
|
||||
if (name != NULL) {
|
||||
if (*name != '<' && STRNCMP("g:", xp->xp_pattern, 2) == 0) {
|
||||
return cat_prefix_varname('g', name);
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
while ((size_t)++intidx < ARRAY_SIZE(functions)
|
||||
&& functions[intidx].name[0] == '\0') {
|
||||
|
Reference in New Issue
Block a user