mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 16:36:30 +00:00
fix(messages): proper multiline Lua print() messages #31205
Problem: Separate message emitted for each newline present in Lua print() arguments. Solution: Make msg_multiline() handle NUL bytes. Refactor print() to use msg_multiline(). Refactor vim.print() to use print().
This commit is contained in:
@@ -7881,7 +7881,7 @@ void ex_echo(exarg_T *eap)
|
||||
char *tofree = encode_tv2echo(&rettv, NULL);
|
||||
if (*tofree != NUL) {
|
||||
msg_ext_set_kind("echo");
|
||||
msg_multiline(tofree, echo_hl_id, true, false, &need_clear);
|
||||
msg_multiline(cstr_as_string(tofree), echo_hl_id, true, false, &need_clear);
|
||||
}
|
||||
xfree(tofree);
|
||||
}
|
||||
|
Reference in New Issue
Block a user