aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-06-05 19:08:01 +0100
committerGitHub <noreply@github.com>2023-06-05 19:08:01 +0100
commitc1ee187f82141d778335955c9603c69e6f4785d7 (patch)
treeb9481fd0d934c5f8587cbcfe980b3bfa7e1015ba /src/nvim/lua/executor.c
parentcbbda3bcd77595eeabcc0fb70cee513e473833e6 (diff)
downloadrneovim-c1ee187f82141d778335955c9603c69e6f4785d7.tar.gz
rneovim-c1ee187f82141d778335955c9603c69e6f4785d7.tar.bz2
rneovim-c1ee187f82141d778335955c9603c69e6f4785d7.zip
fix: vim.loop in luv threads (#23924)
Fixes #23914
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 36dcb6efcf..35540de99e 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -580,6 +580,9 @@ static void nlua_common_vim_init(lua_State *lstate, bool is_thread, bool is_stan
lua_pushvalue(lstate, -1);
lua_setfield(lstate, -3, "uv");
+ lua_pushvalue(lstate, -1);
+ lua_setfield(lstate, -3, "loop"); // deprecated
+
// package.loaded.luv = vim.uv
// otherwise luv will be reinitialized when require'luv'
lua_getglobal(lstate, "package");