mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
api: allow nvim_buf_attach from lua using callbacks
This commit is contained in:
@@ -253,7 +253,8 @@ bool msgpack_rpc_to_object(const msgpack_object *const obj, Object *const arg)
|
||||
case kObjectTypeFloat:
|
||||
case kObjectTypeString:
|
||||
case kObjectTypeArray:
|
||||
case kObjectTypeDictionary: {
|
||||
case kObjectTypeDictionary:
|
||||
case kObjectTypeLuaRef: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -387,6 +388,13 @@ void msgpack_rpc_from_object(const Object result, msgpack_packer *const res)
|
||||
msgpack_pack_nil(res);
|
||||
break;
|
||||
}
|
||||
case kObjectTypeLuaRef: {
|
||||
// TODO(bfredl): could also be an error. Though kObjectTypeLuaRef
|
||||
// should only appear when the caller has opted in to handle references,
|
||||
// see nlua_pop_Object.
|
||||
msgpack_pack_nil(res);
|
||||
break;
|
||||
}
|
||||
case kObjectTypeBoolean: {
|
||||
msgpack_rpc_from_boolean(cur.aobj->data.boolean, res);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user