fix(eval): check for v:lua when calling callback (#19855)

This makes callback_call() match call_vim_function() when calling a function.
This commit is contained in:
zeertzjq
2022-08-20 15:52:35 +08:00
committed by GitHub
parent 1a57cd3836
commit bffaf1e27e
3 changed files with 16 additions and 3 deletions

View File

@@ -6191,7 +6191,7 @@ static void op_function(const oparg_T *oap)
finish_op = false;
typval_T rettv;
if (callback_call(&opfunc_cb, 1, argv, &rettv) != FAIL) {
if (callback_call(&opfunc_cb, 1, argv, &rettv)) {
tv_clear(&rettv);
}