Mercurial > vim
comparison src/evalfunc.c @ 23598:a9433f834693 v8.2.2341
patch 8.2.2341: expresison command line completion incomplete after "g:"
Commit: https://github.com/vim/vim/commit/1bb4de5302ba038b9c59e845b6d735e87d5681d0
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 13 19:48:46 2021 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 13 Jan 2021 20:00:05 +0100 |
parents | d3e064f54890 |
children | f4347a61ed38 |
comparison
equal
deleted
inserted
replaced
23597:000119fdb207 | 23598:a9433f834693 |
---|---|
1820 intidx = -1; | 1820 intidx = -1; |
1821 if (intidx < 0) | 1821 if (intidx < 0) |
1822 { | 1822 { |
1823 name = get_user_func_name(xp, idx); | 1823 name = get_user_func_name(xp, idx); |
1824 if (name != NULL) | 1824 if (name != NULL) |
1825 { | |
1826 if (*name != '<' && STRNCMP("g:", xp->xp_pattern, 2) == 0) | |
1827 return cat_prefix_varname('g', name); | |
1825 return name; | 1828 return name; |
1829 } | |
1826 } | 1830 } |
1827 if (++intidx < (int)(sizeof(global_functions) / sizeof(funcentry_T))) | 1831 if (++intidx < (int)(sizeof(global_functions) / sizeof(funcentry_T))) |
1828 { | 1832 { |
1829 STRCPY(IObuff, global_functions[intidx].f_name); | 1833 STRCPY(IObuff, global_functions[intidx].f_name); |
1830 STRCAT(IObuff, "("); | 1834 STRCAT(IObuff, "("); |