diff options
author | James McCoy <jamessan@jamessan.com> | 2021-10-18 09:08:46 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2021-11-01 06:41:28 -0400 |
commit | efa924f66b183d9cf2404ce91c4f009c27e0515a (patch) | |
tree | adc8c74cba88e76c2ae0548cd6e9b01804da9933 /src/nvim/lua/executor.c | |
parent | 684640f5518a483cf2bc48efc8f68449379cef69 (diff) | |
download | rneovim-efa924f66b183d9cf2404ce91c4f009c27e0515a.tar.gz rneovim-efa924f66b183d9cf2404ce91c4f009c27e0515a.tar.bz2 rneovim-efa924f66b183d9cf2404ce91c4f009c27e0515a.zip |
vim-patch:8.1.0743: giving error messages is not flexible
Problem: Giving error messages is not flexible.
Solution: Add semsg(). Change argument from "char_u *" to "char *", also
for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of
an enormous number of type casts.
https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r-- | src/nvim/lua/executor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 05c33d7918..f3888c7a90 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -80,7 +80,7 @@ static void nlua_error(lua_State *const lstate, const char *const msg) const char *const str = lua_tolstring(lstate, -1, &len); msg_ext_set_kind("lua_error"); - emsgf_multiline(msg, (int)len, str); + semsg_multiline(msg, (int)len, str); lua_pop(lstate, 1); } @@ -101,7 +101,7 @@ static void nlua_luv_error_event(void **argv) { char *error = (char *)argv[0]; msg_ext_set_kind("lua_error"); - emsgf_multiline("Error executing luv callback:\n%s", error); + semsg_multiline("Error executing luv callback:\n%s", error); xfree(error); } @@ -458,7 +458,7 @@ void nlua_init(void) lua_State *lstate = luaL_newstate(); if (lstate == NULL) { - EMSG(_("E970: Failed to initialize lua interpreter")); + emsg(_("E970: Failed to initialize lua interpreter")); preserve_exit(); } luaL_openlibs(lstate); @@ -1091,7 +1091,7 @@ void ex_luado(exarg_T *const eap) FUNC_ATTR_NONNULL_ALL { if (u_save(eap->line1 - 1, eap->line2 + 1) == FAIL) { - EMSG(_("cannot save undo information")); + emsg(_("cannot save undo information")); return; } const char *const cmd = (const char *)eap->arg; |