aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@protonmail.com>2022-06-08 09:06:36 +0600
committerFamiu Haque <famiuhaque@protonmail.com>2022-06-08 15:24:52 +0600
commitc84bd9e21fb1e5c55c9c5370b07271a6ae96f19c (patch)
tree102caf20be85af78aad8cc4695ae1e7abcf3baf3 /src/nvim/lua/executor.c
parent3cd22a34852b7453eecb4715806cc09dcc226e0c (diff)
downloadrneovim-c84bd9e21fb1e5c55c9c5370b07271a6ae96f19c.tar.gz
rneovim-c84bd9e21fb1e5c55c9c5370b07271a6ae96f19c.tar.bz2
rneovim-c84bd9e21fb1e5c55c9c5370b07271a6ae96f19c.zip
fix(nvim_create_user_command): make `smods` work with `nvim_cmd`
Closes #18876.
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index deff2347e0..3ba4d0d70c 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -1919,7 +1919,8 @@ int nlua_do_ucmd(ucmd_T *cmd, exarg_T *eap, bool preview)
lua_pushinteger(lstate, cmdmod.tab);
lua_setfield(lstate, -2, "tab");
- lua_pushinteger(lstate, p_verbose);
+
+ lua_pushinteger(lstate, eap->verbose_save != -1 ? p_verbose : -1);
lua_setfield(lstate, -2, "verbose");
if (cmdmod.split & WSP_ABOVE) {
@@ -1937,9 +1938,9 @@ int nlua_do_ucmd(ucmd_T *cmd, exarg_T *eap, bool preview)
lua_pushboolean(lstate, cmdmod.split & WSP_VERT);
lua_setfield(lstate, -2, "vertical");
- lua_pushboolean(lstate, msg_silent != 0);
+ lua_pushboolean(lstate, eap->save_msg_silent != -1 ? (msg_silent != 0) : 0);
lua_setfield(lstate, -2, "silent");
- lua_pushboolean(lstate, emsg_silent != 0);
+ lua_pushboolean(lstate, eap->did_esilent);
lua_setfield(lstate, -2, "emsg_silent");
lua_pushboolean(lstate, eap->did_sandbox);
lua_setfield(lstate, -2, "sandbox");