To: vim_dev@googlegroups.com Subject: Patch 7.4.20 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2096 Problem: Lambda functions show up with completion. Solution: Don't show lambda functions. (Ken Takata) Files: src/userfunc.c, src/testdir/test_cmdline.vim *** ../vim-7.4.2095/src/userfunc.c 2016-07-22 21:49:36.670031501 +0200 --- src/userfunc.c 2016-07-23 15:37:08.996498218 +0200 *************** *** 2554,2561 **** ++hi; fp = HI2UF(hi); ! if (fp->uf_flags & FC_DICT) ! return (char_u *)""; /* don't show dict functions */ if (STRLEN(fp->uf_name) + 4 >= IOSIZE) return fp->uf_name; /* prevents overflow */ --- 2554,2562 ---- ++hi; fp = HI2UF(hi); ! if ((fp->uf_flags & FC_DICT) ! || STRNCMP(fp->uf_name, "", 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 */ *** ../vim-7.4.2095/src/testdir/test_cmdline.vim 2016-07-17 23:34:16.684434869 +0200 --- src/testdir/test_cmdline.vim 2016-07-23 15:42:46.377332620 +0200 *************** *** 69,74 **** --- 69,79 ---- let l = getcompletion('tag', 'function') call assert_true(index(l, 'taglist(') >= 0) + let Flambda = {-> 'hello'} + let l = getcompletion('', 'function') + let l = filter(l, {i, v -> v =~ 'lambda'}) + call assert_equal(0, len(l)) + let l = getcompletion('run', 'file') call assert_true(index(l, 'runtest.vim') >= 0) *** ../vim-7.4.2095/src/version.c 2016-07-23 15:35:14.161576920 +0200 --- src/version.c 2016-07-23 15:37:01.536568274 +0200 *************** *** 760,761 **** --- 760,763 ---- { /* Add new patch number below this line */ + /**/ + 2096, /**/ -- There can't be a crisis today, my schedule is already full. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///