aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-08-21 16:19:45 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2021-09-17 02:10:44 +0100
commitebd035f08b667626eb5f2e02d03628483166abed (patch)
treed65bc70d45786e7aee4f303f779308bc9699d93f /src/nvim/eval/funcs.c
parent26b7faf1f21c8583587df2e8ed9c3ac3426f677d (diff)
downloadrneovim-ebd035f08b667626eb5f2e02d03628483166abed.tar.gz
rneovim-ebd035f08b667626eb5f2e02d03628483166abed.tar.bz2
rneovim-ebd035f08b667626eb5f2e02d03628483166abed.zip
vim-patch:8.2.3360: user function completion fails with dict function
Problem: User function completion fails with dict function. Solution: Do not stop sequencing through the list if user functions when encountering an empty name. (Naohiro Ono, closes vim/vim#8765, closes vim/vim#8774) https://github.com/vim/vim/commit/5aec755b678cfd434b8ea2158d06992f33e1ff80
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r--src/nvim/eval/funcs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index 2ab9801fab..821a2c8e8e 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -119,8 +119,9 @@ 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 && *name != NUL) {
- if (*name != '<' && STRNCMP("g:", xp->xp_pattern, 2) == 0) {
+ if (name != NULL) {
+ if (*name != NUL && *name != '<'
+ && STRNCMP("g:", xp->xp_pattern, 2) == 0) {
return cat_prefix_varname('g', name);
}
return name;