mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge #9736 from janlazo/vim-8.1.0019
This commit is contained in:
commit
8d00393d0c
@ -6328,8 +6328,12 @@ call_func(
|
||||
}
|
||||
|
||||
|
||||
/* execute the function if no errors detected and executing */
|
||||
if (evaluate && error == ERROR_NONE) {
|
||||
// Execute the function if executing and no errors were detected.
|
||||
if (!evaluate) {
|
||||
// Not evaluating, which means the return value is unknown. This
|
||||
// matters for giving error messages.
|
||||
rettv->v_type = VAR_UNKNOWN;
|
||||
} else if (error == ERROR_NONE) {
|
||||
char_u *rfname = fname;
|
||||
|
||||
/* Ignore "g:" before a function name. */
|
||||
|
@ -291,3 +291,9 @@ func Test_named_function_closure()
|
||||
call garbagecollect()
|
||||
call assert_equal(14, s:Abar())
|
||||
endfunc
|
||||
|
||||
func Test_lambda_with_index()
|
||||
let List = {x -> [x]}
|
||||
let Extract = {-> function(List, ['foobar'])()[0]}
|
||||
call assert_equal('foobar', Extract())
|
||||
endfunc
|
||||
|
@ -47,6 +47,9 @@ func Test_repeat_many()
|
||||
call timer_stopall()
|
||||
let g:val = 0
|
||||
let timer = timer_start(50, 'MyHandler', {'repeat': -1})
|
||||
if has('mac')
|
||||
sleep 200m
|
||||
endif
|
||||
sleep 200m
|
||||
call timer_stop(timer)
|
||||
call assert_inrange((has('mac') ? 1 : 2), 4, g:val)
|
||||
|
Loading…
Reference in New Issue
Block a user