From c146eddc8b768f1cd395ea0ce54c19e64eff0c08 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Tue, 8 Sep 2020 09:47:10 +0200 Subject: api: add API for themes co-author: hlpr98 (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later() --- src/nvim/lua/executor.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/nvim/lua/executor.c') diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 5c665920b5..887e8228aa 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -891,6 +891,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(). -- cgit From c60c7375f5754eea2a4209cc6441e70b2bb44f14 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Mon, 19 Oct 2020 20:05:54 +0200 Subject: startup: handle autoload and lua packages during startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ¡NO HAY BANDA! --- src/nvim/lua/executor.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/nvim/lua/executor.c') diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 887e8228aa..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]; -- cgit