From 147908336ec2e2051dd752e38964d0c36aea1b54 Mon Sep 17 00:00:00 2001 From: bfredl Date: Mon, 7 Mar 2022 11:01:13 +0100 Subject: fix(lua): don't use nlua_error when exiting early Screen state is not initialized yet. Print directly to stderr instead. --- src/nvim/lua/executor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim/lua/executor.c') diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 29a3c515c2..6aaff100ca 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -565,7 +565,8 @@ static bool nlua_init_packages(lua_State *lstate) lua_getglobal(lstate, "require"); lua_pushstring(lstate, "vim._init_packages"); if (nlua_pcall(lstate, 1, 0)) { - nlua_error(lstate, _("E5106: Error while loading packages: %.*s\n")); + mch_errmsg(lua_tostring(lstate, -1)); + mch_errmsg("\n"); return false; } -- cgit