aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/command.c
diff options
context:
space:
mode:
authorii14 <59243201+ii14@users.noreply.github.com>2022-08-03 14:41:17 +0200
committerGitHub <noreply@github.com>2022-08-03 13:41:17 +0100
commit3df8d9b8c56a7f0af0f7590b11831bd96ead92f1 (patch)
tree23703fdf6aa7b32fe317e1cb5cbc6ee62e8d58c7 /src/nvim/api/command.c
parentc57e133e50b9f3ccd9a3d73f4e7e3e7281797000 (diff)
downloadrneovim-3df8d9b8c56a7f0af0f7590b11831bd96ead92f1.tar.gz
rneovim-3df8d9b8c56a7f0af0f7590b11831bd96ead92f1.tar.bz2
rneovim-3df8d9b8c56a7f0af0f7590b11831bd96ead92f1.zip
feat(lua): print source locations of lua callbacks (#19597)
Co-authored-by: ii14 <ii14@users.noreply.github.com>
Diffstat (limited to 'src/nvim/api/command.c')
-rw-r--r--src/nvim/api/command.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/api/command.c b/src/nvim/api/command.c
index 5ab0beec9d..04242932c9 100644
--- a/src/nvim/api/command.c
+++ b/src/nvim/api/command.c
@@ -944,7 +944,7 @@ void create_user_command(String name, Object command, Dict(user_command) *opts,
cmd_addr_T addr_type_arg = ADDR_NONE;
int compl = EXPAND_NOTHING;
char *compl_arg = NULL;
- char *rep = NULL;
+ const char *rep = NULL;
LuaRef luaref = LUA_NOREF;
LuaRef compl_luaref = LUA_NOREF;
LuaRef preview_luaref = LUA_NOREF;
@@ -1116,8 +1116,7 @@ void create_user_command(String name, Object command, Dict(user_command) *opts,
if (opts->desc.type == kObjectTypeString) {
rep = opts->desc.data.string.data;
} else {
- snprintf((char *)IObuff, IOSIZE, "<Lua function %d>", luaref);
- rep = (char *)IObuff;
+ rep = "";
}
break;
case kObjectTypeString: