aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/gen_vimdoc.py3
-rw-r--r--src/nvim/api/vim.c8
-rw-r--r--src/nvim/generators/gen_api_dispatch.lua4
3 files changed, 12 insertions, 3 deletions
diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py
index 22fd155d32..9ab80991b7 100755
--- a/scripts/gen_vimdoc.py
+++ b/scripts/gen_vimdoc.py
@@ -947,7 +947,8 @@ def fmt_doxygen_xml_as_vimhelp(filename, target):
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
return ('\n\n'.join(list(fns_txt.values())),
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 56516b2ac7..5d941890db 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -2256,3 +2256,11 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Error *
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 : "");
+}
diff --git a/src/nvim/generators/gen_api_dispatch.lua b/src/nvim/generators/gen_api_dispatch.lua
index 4cf282770d..b167767f7a 100644
--- a/src/nvim/generators/gen_api_dispatch.lua
+++ b/src/nvim/generators/gen_api_dispatch.lua
@@ -91,7 +91,7 @@ local deprecated_aliases = require("api.dispatch_deprecated")
for _,f in ipairs(shallowcopy(functions)) do
local ismethod = false
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
elseif f.since == nil then
print("Function "..f.name.." lacks since field.\n")
@@ -149,7 +149,7 @@ local exported_attributes = {'name', 'return_type', 'method',
'since', 'deprecated_since'}
local exported_functions = {}
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 = {}
for _,attr in ipairs(exported_attributes) do
f_exported[attr] = f[attr]