diff --git a/src/nvim/api/vimscript.c b/src/nvim/api/vimscript.c index 67db615b20..e0a3386ffb 100644 --- a/src/nvim/api/vimscript.c +++ b/src/nvim/api/vimscript.c @@ -282,7 +282,10 @@ Object nvim_call_dict_function(Object dict, String fn, Array args, Arena *arena, switch (dict.type) { case kObjectTypeString: TRY_WRAP(err, { - eval0(dict.data.string.data, &rettv, NULL, &EVALARG_EVALUATE); + int rv = eval0(dict.data.string.data, &rettv, NULL, &EVALARG_EVALUATE); + if (rv != OK && !ERROR_SET(err)) { + abort(); + } clear_evalarg(&EVALARG_EVALUATE, NULL); }); if (ERROR_SET(err)) {