diff options
| author | Matthieu Coudron <886074+teto@users.noreply.github.com> | 2025-10-21 16:46:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-21 07:46:03 -0700 |
| commit | e42050f4aed5ee332cc95bacd622bfbc9a31dbe0 (patch) | |
| tree | 8272c003aef62238697c100273c575a82997f4b1 /src/nvim/lua/executor.c | |
| parent | 3c4acc0f1a2ba3c54e858283cf949e28079eb379 (diff) | |
| download | rneovim-e42050f4aed5ee332cc95bacd622bfbc9a31dbe0.tar.gz rneovim-e42050f4aed5ee332cc95bacd622bfbc9a31dbe0.tar.bz2 rneovim-e42050f4aed5ee332cc95bacd622bfbc9a31dbe0.zip | |
feat(vimscript): log function name in "fast" message #32616
Diffstat (limited to 'src/nvim/lua/executor.c')
| -rw-r--r-- | src/nvim/lua/executor.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 54b36d06d8..124fce58b6 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -1179,7 +1179,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; |