diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 8becb29b26..d8c2e73150 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -12796,13 +12796,17 @@ static void f_send_call(typval_T *argvars, typval_T *rettv) return; } + if (errored) { + vim_report_error(result.data.string); + goto end; + } + Error conversion_error = {.set = false}; - if (errored || !object_to_vim(result, rettv, &conversion_error)) { - EMSG(errored ? - result.data.string.data : - _("Error converting the call result")); + if (!object_to_vim(result, rettv, &conversion_error)) { + EMSG(_("Error converting the call result")); } +end: api_free_object(result); } |