aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/provider.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/os/provider.c')
-rw-r--r--src/nvim/os/provider.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nvim/os/provider.c b/src/nvim/os/provider.c
index 2e7a677793..d4fffaa053 100644
--- a/src/nvim/os/provider.c
+++ b/src/nvim/os/provider.c
@@ -107,12 +107,11 @@ Object provider_call(char *method, Array args)
return NIL;
}
- bool error = false;
- Object result = NIL;
- channel_send_call(f->channel_id, method, args, &result, &error);
+ Error err = ERROR_INIT;
+ Object result = NIL = channel_send_call(f->channel_id, method, args, &err);
- if (error) {
- vim_report_error(result.data.string);
+ if (err.set) {
+ vim_report_error(cstr_as_string(err.msg));
api_free_object(result);
return NIL;
}