diff options
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r-- | src/nvim/lua/executor.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index c4fa8b0fff..71c5cd4585 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -23,7 +23,6 @@ #include "nvim/cursor.h" #include "nvim/drawscreen.h" #include "nvim/errors.h" -#include "nvim/eval.h" #include "nvim/eval/funcs.h" #include "nvim/eval/typval.h" #include "nvim/eval/typval_defs.h" @@ -47,10 +46,12 @@ #include "nvim/lua/treesitter.h" #include "nvim/macros_defs.h" #include "nvim/main.h" +#include "nvim/mbyte_defs.h" #include "nvim/memline.h" #include "nvim/memory.h" #include "nvim/memory_defs.h" #include "nvim/message.h" +#include "nvim/message_defs.h" #include "nvim/msgpack_rpc/channel.h" #include "nvim/option_vars.h" #include "nvim/os/fileio.h" @@ -275,10 +276,9 @@ static int nlua_luv_thread_common_cfpcall(lua_State *lstate, int nargs, int nres #endif } const char *error = lua_tostring(lstate, -1); - loop_schedule_deferred(&main_loop, event_create(nlua_luv_error_event, - xstrdup(error), + error != NULL ? xstrdup(error) : NULL, (void *)(intptr_t)(is_callback ? kThreadCallback : kThread))); @@ -957,7 +957,7 @@ static void nlua_print_event(void **argv) HlMessage msg = KV_INITIAL_VALUE; HlMessageChunk chunk = { { .data = argv[0], .size = (size_t)(intptr_t)argv[1] - 1 }, 0 }; kv_push(msg, chunk); - msg_multihl(msg, "lua_print", true); + msg_multihl(msg, "lua_print", true, false); } /// Print as a Vim message @@ -1587,8 +1587,8 @@ Object nlua_call_ref_ctx(bool fast, LuaRef ref, const char *name, Array args, Lu if (nlua_fast_cfpcall(lstate, nargs, 1, -1) < 0) { // error is already scheduled, set anyways to convey failure. api_set_error(err, kErrorTypeException, "fast context failure"); + return NIL; } - return NIL; } else if (nlua_pcall(lstate, nargs, 1)) { // if err is passed, the caller will deal with the error. if (err) { |