aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index ac68c02d8b..5bc06bf3fe 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -1917,7 +1917,7 @@ int nlua_do_ucmd(ucmd_T *cmd, exarg_T *eap, bool preview)
lua_newtable(lstate); // smods table
- lua_pushinteger(lstate, cmdmod.tab);
+ lua_pushinteger(lstate, cmdmod.cmod_tab);
lua_setfield(lstate, -2, "tab");
lua_pushinteger(lstate, (cmdmod.cmod_verbose != 0
@@ -1925,20 +1925,20 @@ int nlua_do_ucmd(ucmd_T *cmd, exarg_T *eap, bool preview)
: -1));
lua_setfield(lstate, -2, "verbose");
- if (cmdmod.split & WSP_ABOVE) {
+ if (cmdmod.cmod_split & WSP_ABOVE) {
lua_pushstring(lstate, "aboveleft");
- } else if (cmdmod.split & WSP_BELOW) {
+ } else if (cmdmod.cmod_split & WSP_BELOW) {
lua_pushstring(lstate, "belowright");
- } else if (cmdmod.split & WSP_TOP) {
+ } else if (cmdmod.cmod_split & WSP_TOP) {
lua_pushstring(lstate, "topleft");
- } else if (cmdmod.split & WSP_BOT) {
+ } else if (cmdmod.cmod_split & WSP_BOT) {
lua_pushstring(lstate, "botright");
} else {
lua_pushstring(lstate, "");
}
lua_setfield(lstate, -2, "split");
- lua_pushboolean(lstate, cmdmod.split & WSP_VERT);
+ lua_pushboolean(lstate, cmdmod.cmod_split & WSP_VERT);
lua_setfield(lstate, -2, "vertical");
lua_pushboolean(lstate, cmdmod.cmod_flags & CMOD_SILENT);
lua_setfield(lstate, -2, "silent");
@@ -1950,24 +1950,24 @@ int nlua_do_ucmd(ucmd_T *cmd, exarg_T *eap, bool preview)
lua_setfield(lstate, -2, "noautocmd");
typedef struct {
- bool *set;
+ int flag;
char *name;
} mod_entry_T;
static mod_entry_T mod_entries[] = {
- { &cmdmod.browse, "browse" },
- { &cmdmod.confirm, "confirm" },
- { &cmdmod.hide, "hide" },
- { &cmdmod.keepalt, "keepalt" },
- { &cmdmod.keepjumps, "keepjumps" },
- { &cmdmod.keepmarks, "keepmarks" },
- { &cmdmod.keeppatterns, "keeppatterns" },
- { &cmdmod.lockmarks, "lockmarks" },
- { &cmdmod.noswapfile, "noswapfile" }
+ { CMOD_BROWSE, "browse" },
+ { CMOD_CONFIRM, "confirm" },
+ { CMOD_HIDE, "hide" },
+ { CMOD_KEEPALT, "keepalt" },
+ { CMOD_KEEPJUMPS, "keepjumps" },
+ { CMOD_KEEPMARKS, "keepmarks" },
+ { CMOD_KEEPPATTERNS, "keeppatterns" },
+ { CMOD_LOCKMARKS, "lockmarks" },
+ { CMOD_NOSWAPFILE, "noswapfile" }
};
// The modifiers that are simple flags
for (size_t i = 0; i < ARRAY_SIZE(mod_entries); i++) {
- lua_pushboolean(lstate, *mod_entries[i].set);
+ lua_pushboolean(lstate, cmdmod.cmod_flags & mod_entries[i].flag);
lua_setfield(lstate, -2, mod_entries[i].name);
}