aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-11-07 18:00:21 +0100
committerGitHub <noreply@github.com>2022-11-07 18:00:21 +0100
commit059dfda0caef85688c2b555ec8379e86721e50fd (patch)
tree6d6378048ed53335fb0190f2e625743a5b196ea6 /src/nvim/lua/executor.c
parent894c59ec1f39fde259d5b6959c35549a0281943d (diff)
parentc022140ec6a66402e405152054b6ab0141940419 (diff)
downloadrneovim-059dfda0caef85688c2b555ec8379e86721e50fd.tar.gz
rneovim-059dfda0caef85688c2b555ec8379e86721e50fd.tar.bz2
rneovim-059dfda0caef85688c2b555ec8379e86721e50fd.zip
Merge pull request #20991 from famiu/feat/api/nvim_cmd/command-name
feat(api): add command name to Lua command callback opts
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 9d63fe55f9..9cb42a81d3 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -1985,6 +1985,9 @@ int nlua_do_ucmd(ucmd_T *cmd, exarg_T *eap, bool preview)
nlua_pushref(lstate, preview ? cmd->uc_preview_luaref : cmd->uc_luaref);
lua_newtable(lstate);
+ lua_pushstring(lstate, cmd->uc_name);
+ lua_setfield(lstate, -2, "name");
+
lua_pushboolean(lstate, eap->forceit == 1);
lua_setfield(lstate, -2, "bang");