message.c: add msg_echo_attr functions, use it for lua error messages

The added function behaves like the non-echo function but display message
in a echo-style way (i.e. tab and newline are preserved)
This commit is contained in:
Alexandre Dubray
2018-02-05 12:34:10 +01:00
committed by Björn Linse
parent bfb8170d32
commit 7f2e43c637
2 changed files with 131 additions and 29 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(msg, (int)len, str);
emsgf_echo(msg, (int)len, str);
lua_pop(lstate, 1);
}