cleanup: reduce some duplicate code, avoid function pointers for a condition

Add 'multiline' flag to history for correct :messages output

Use larger buffer size for multiline messages. if this turns out to not
be enough, we could do size calculation like api_set_error
This commit is contained in:
Björn Linse
2019-01-18 12:16:58 +01:00
parent 67bac681ea
commit 27b7813025
5 changed files with 73 additions and 114 deletions

View File

@@ -50,7 +50,7 @@ static void nlua_error(lua_State *const lstate, const char *const msg)
size_t len;
const char *const str = lua_tolstring(lstate, -1, &len);
emsgf_echo(msg, (int)len, str);
emsgf_multiline(msg, (int)len, str);
lua_pop(lstate, 1);
}