mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00
fix(rpc): break nvim_error_event feedback loop between two nvim instances
In case nvim A sends nvim_error_event to nvim B, it would respond with another nvim_error_event due to unknown request name. Fix this by adding dummy request handler for now.
This commit is contained in:
@@ -947,7 +947,8 @@ def fmt_doxygen_xml_as_vimhelp(filename, target):
|
|||||||
|
|
||||||
func_doc = "\n".join(split_lines)
|
func_doc = "\n".join(split_lines)
|
||||||
|
|
||||||
if name.startswith(CONFIG[target]['fn_name_prefix']):
|
if (name.startswith(CONFIG[target]['fn_name_prefix'])
|
||||||
|
and name != "nvim_error_event"):
|
||||||
fns_txt[name] = func_doc
|
fns_txt[name] = func_doc
|
||||||
|
|
||||||
return ('\n\n'.join(list(fns_txt.values())),
|
return ('\n\n'.join(list(fns_txt.values())),
|
||||||
|
@@ -2256,3 +2256,11 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Error *
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nvim_error_event(uint64_t channel_id, Integer lvl, String data)
|
||||||
|
FUNC_API_REMOTE_ONLY
|
||||||
|
{
|
||||||
|
// TODO(bfredl): consider printing message to user, as will be relevant
|
||||||
|
// if we fork nvim processes as async workers
|
||||||
|
ELOG("async error on channel %" PRId64 ": %s", channel_id, data.size ? data.data : "");
|
||||||
|
}
|
||||||
|
@@ -91,7 +91,7 @@ local deprecated_aliases = require("api.dispatch_deprecated")
|
|||||||
for _,f in ipairs(shallowcopy(functions)) do
|
for _,f in ipairs(shallowcopy(functions)) do
|
||||||
local ismethod = false
|
local ismethod = false
|
||||||
if startswith(f.name, "nvim_") then
|
if startswith(f.name, "nvim_") then
|
||||||
if startswith(f.name, "nvim__") then
|
if startswith(f.name, "nvim__") or f.name == "nvim_error_event" then
|
||||||
f.since = -1
|
f.since = -1
|
||||||
elseif f.since == nil then
|
elseif f.since == nil then
|
||||||
print("Function "..f.name.." lacks since field.\n")
|
print("Function "..f.name.." lacks since field.\n")
|
||||||
@@ -149,7 +149,7 @@ local exported_attributes = {'name', 'return_type', 'method',
|
|||||||
'since', 'deprecated_since'}
|
'since', 'deprecated_since'}
|
||||||
local exported_functions = {}
|
local exported_functions = {}
|
||||||
for _,f in ipairs(functions) do
|
for _,f in ipairs(functions) do
|
||||||
if not startswith(f.name, "nvim__") then
|
if not (startswith(f.name, "nvim__") or f.name == "nvim_error_event") then
|
||||||
local f_exported = {}
|
local f_exported = {}
|
||||||
for _,attr in ipairs(exported_attributes) do
|
for _,attr in ipairs(exported_attributes) do
|
||||||
f_exported[attr] = f[attr]
|
f_exported[attr] = f[attr]
|
||||||
|
Reference in New Issue
Block a user