mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.2096
Problem: Lambda functions show up with completion.
Solution: Don't show lambda functions. (Ken Takata)
b49edc11a1
This commit is contained in:
parent
7f4848aff4
commit
cbaa87a639
@ -21839,8 +21839,10 @@ char_u *get_user_func_name(expand_T *xp, int idx)
|
|||||||
++hi;
|
++hi;
|
||||||
fp = HI2UF(hi);
|
fp = HI2UF(hi);
|
||||||
|
|
||||||
if (fp->uf_flags & FC_DICT)
|
if ((fp->uf_flags & FC_DICT)
|
||||||
return (char_u *)""; /* don't show dict functions */
|
|| STRNCMP(fp->uf_name, "<lambda>", 8) == 0) {
|
||||||
|
return (char_u *)""; // don't show dict and lambda functions
|
||||||
|
}
|
||||||
|
|
||||||
if (STRLEN(fp->uf_name) + 4 >= IOSIZE)
|
if (STRLEN(fp->uf_name) + 4 >= IOSIZE)
|
||||||
return fp->uf_name; /* prevents overflow */
|
return fp->uf_name; /* prevents overflow */
|
||||||
|
@ -85,6 +85,11 @@ func Test_getcompletion()
|
|||||||
let l = getcompletion('paint', 'function')
|
let l = getcompletion('paint', 'function')
|
||||||
call assert_equal([], l)
|
call assert_equal([], l)
|
||||||
|
|
||||||
|
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')
|
let l = getcompletion('run', 'file')
|
||||||
call assert_true(index(l, 'runtest.vim') >= 0)
|
call assert_true(index(l, 'runtest.vim') >= 0)
|
||||||
let l = getcompletion('walk', 'file')
|
let l = getcompletion('walk', 'file')
|
||||||
|
@ -344,7 +344,7 @@ static int included_patches[] = {
|
|||||||
2099,
|
2099,
|
||||||
// 2098,
|
// 2098,
|
||||||
// 2097,
|
// 2097,
|
||||||
// 2096,
|
2096,
|
||||||
// 2095,
|
// 2095,
|
||||||
// 2094 NA
|
// 2094 NA
|
||||||
// 2093 NA
|
// 2093 NA
|
||||||
|
Loading…
Reference in New Issue
Block a user