aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-08-15 16:32:06 +0300
committerZyX <kp-pav@yandex.ru>2017-08-15 16:34:51 +0300
commit93ef823f5e5347e685b4a69fff487278d0b4ed87 (patch)
treed9ef1fe4379c8ae3b46a86e157ac89e37b43fb75 /src
parent96b1600bc822d72f5a1defa1dafda562ff208b7e (diff)
downloadrneovim-93ef823f5e5347e685b4a69fff487278d0b4ed87.tar.gz
rneovim-93ef823f5e5347e685b4a69fff487278d0b4ed87.tar.bz2
rneovim-93ef823f5e5347e685b4a69fff487278d0b4ed87.zip
lua/executor: Move stricmp to vim “module” and document it
Diffstat (limited to 'src')
-rw-r--r--src/nvim/lua/executor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 4ed477ea36..90333be541 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -281,10 +281,6 @@ static int nlua_exec_lua_file(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL
/// Called by lua interpreter itself to initialize state.
static int nlua_state_init(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL
{
- // stricmp
- lua_pushcfunction(lstate, &nlua_stricmp);
- lua_setglobal(lstate, "stricmp");
-
// print
lua_pushcfunction(lstate, &nlua_print);
lua_setglobal(lstate, "print");
@@ -304,6 +300,10 @@ static int nlua_state_init(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL
nlua_add_api_functions(lstate);
// vim.types, vim.type_idx, vim.val_idx
nlua_init_types(lstate);
+ // stricmp
+ lua_pushcfunction(lstate, &nlua_stricmp);
+ lua_setfield(lstate, -2, "stricmp");
+
lua_setglobal(lstate, "vim");
return 0;
}