diff src/userfunc.c @ 9638:af0d98d8836e v7.4.2096

commit https://github.com/vim/vim/commit/b49edc11a1872fa99befa9a4a8ea6c8537868038 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 23 15:47:34 2016 +0200 patch 7.4.2096 Problem: Lambda functions show up with completion. Solution: Don't show lambda functions. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Sat, 23 Jul 2016 16:00:06 +0200
parents 172131507c85
children f1920505bc16
line wrap: on
line diff
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -2554,8 +2554,9 @@ get_user_func_name(expand_T *xp, int idx
 	    ++hi;
 	fp = HI2UF(hi);
 
-	if (fp->uf_flags & FC_DICT)
-	    return (char_u *)""; /* don't show dict functions */
+	if ((fp->uf_flags & FC_DICT)
+				|| STRNCMP(fp->uf_name, "<lambda>", 8) == 0)
+	    return (char_u *)""; /* don't show dict and lambda functions */
 
 	if (STRLEN(fp->uf_name) + 4 >= IOSIZE)
 	    return fp->uf_name;	/* prevents overflow */