mirror of
https://github.com/neovim/neovim.git
synced 2026-01-04 12:27:44 +00:00
feat(vimscript): log function name in "fast" message #32616
(cherry picked from commit e42050f4ae)
This commit is contained in:
committed by
github-actions[bot]
parent
a7eb110098
commit
f9cad88d5a
@@ -1152,7 +1152,10 @@ int nlua_call(lua_State *lstate)
|
||||
size_t name_len;
|
||||
const char *name = luaL_checklstring(lstate, 1, &name_len);
|
||||
if (!nlua_is_deferred_safe() && !viml_func_is_fast(name)) {
|
||||
return luaL_error(lstate, e_fast_api_disabled, "Vimscript function");
|
||||
size_t length = MIN(strlen(name), 100) + sizeof("Vimscript function \"\"");
|
||||
vim_snprintf(IObuff, length, "Vimscript function \"%s\"", name);
|
||||
int ret = luaL_error(lstate, e_fast_api_disabled, IObuff);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int nargs = lua_gettop(lstate) - 1;
|
||||
|
||||
Reference in New Issue
Block a user