diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index a3d07d8c4f..8eb4fa90d6 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -83,6 +83,7 @@ #include "nvim/os/time.h" #include "nvim/os/channel.h" #include "nvim/api/private/helpers.h" +#include "nvim/api/private/defs.h" #include "nvim/os/msgpack_rpc_helpers.h" #include "nvim/os/dl.h" #include "nvim/os/provider.h" @@ -19125,3 +19126,20 @@ static void apply_job_autocmds(Job *job, char *name, char *type, char *str) apply_autocmds(EVENT_JOBACTIVITY, (uint8_t *)name, NULL, TRUE, NULL); } +static void script_host_eval(char *method, typval_T *argvars, typval_T *rettv) +{ + Object result = provider_call(method, vim_to_object(argvars)); + + if (result.type == kObjectTypeNil) { + return; + } + + Error err = {.set = false}; + object_to_vim(result, rettv, &err); + msgpack_rpc_free_object(result); + + if (err.set) { + EMSG("Error converting value back to vim"); + } +} + |