aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authorRom Grk <romgrk.cc@gmail.com>2020-11-03 03:11:08 -0500
committerRom Grk <romgrk.cc@gmail.com>2020-11-03 03:11:08 -0500
commit13e0ca3e194a438383b8451e19090355aa6c29dc (patch)
tree0ac33ef5ac829b7c74dd15f34b17540c3186c356 /src/nvim/lua/executor.c
parentc7c865214655f7d88fde85ed4947f07319c14182 (diff)
parent5b5848f2fb1f4b7995bb8a59d94b6766d2182070 (diff)
downloadrneovim-13e0ca3e194a438383b8451e19090355aa6c29dc.tar.gz
rneovim-13e0ca3e194a438383b8451e19090355aa6c29dc.tar.bz2
rneovim-13e0ca3e194a438383b8451e19090355aa6c29dc.zip
Merge branch 'master' into add-scroll-events
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 5c665920b5..a095f298f2 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -549,14 +549,6 @@ static lua_State *nlua_enter(void)
// stack: (empty)
lua_getglobal(lstate, "vim");
// stack: vim
- lua_getfield(lstate, -1, "_update_package_paths");
- // stack: vim, vim._update_package_paths
- if (lua_pcall(lstate, 0, 0, 0)) {
- // stack: vim, error
- nlua_error(lstate, _("E5117: Error while updating package paths: %.*s"));
- // stack: vim
- }
- // stack: vim
lua_pop(lstate, 1);
// stack: (empty)
last_p_rtp = (const void *)p_rtp;
@@ -564,14 +556,6 @@ static lua_State *nlua_enter(void)
return lstate;
}
-/// Force an update of lua's package paths if runtime path has changed.
-bool nlua_update_package_path(void)
-{
- lua_State *const lstate = nlua_enter();
-
- return !!lstate;
-}
-
static void nlua_print_event(void **argv)
{
char *str = argv[0];
@@ -891,6 +875,17 @@ LuaRef nlua_newref(lua_State *lstate, LuaRef original_ref)
return new_ref;
}
+LuaRef api_new_luaref(LuaRef original_ref)
+{
+ if (original_ref == LUA_NOREF) {
+ return LUA_NOREF;
+ }
+
+ lua_State *const lstate = nlua_enter();
+ return nlua_newref(lstate, original_ref);
+}
+
+
/// Evaluate lua string
///
/// Used for luaeval().