diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-08-29 12:16:31 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-08-31 09:20:24 +0200 |
commit | 7a857928842476bce8c9bed7cf549fc76c4e6489 (patch) | |
tree | 1ee399db9dd38bf498566a91bacf852dc8c2aae5 /src/nvim/lua/executor.c | |
parent | 8a03acb8dad4abaf507d502b11a66bd5a2b5e51e (diff) | |
download | rneovim-7a857928842476bce8c9bed7cf549fc76c4e6489.tar.gz rneovim-7a857928842476bce8c9bed7cf549fc76c4e6489.tar.bz2 rneovim-7a857928842476bce8c9bed7cf549fc76c4e6489.zip |
tui/input: defer nvim_paste properly.
Otherwise cursor and redraw code for normal and insert mode will not run. The
"tickle" workaround was used for this instead, and can now be removed.
The builtin vim.lua got the name
[string "-- Nvim-Lua stdlib: thevimmodule (:help l..."]
in error messages. Fix it to something reasonable.
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r-- | src/nvim/lua/executor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 3de1b531e6..f51aa3c6d4 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -269,7 +269,9 @@ static int nlua_state_init(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL #endif // vim - if (luaL_dostring(lstate, (char *)&vim_module[0])) { + const char *code = (char *)&vim_module[0]; + if (luaL_loadbuffer(lstate, code, strlen(code), "@vim.lua") + || lua_pcall(lstate, 0, LUA_MULTRET, 0)) { nlua_error(lstate, _("E5106: Error while creating vim module: %.*s")); return 1; } |