aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2024-11-17 19:21:50 +0100
committerGitHub <noreply@github.com>2024-11-17 10:21:50 -0800
commite025f5a5b30a1ef92e88fed0f0c548d2240d30c0 (patch)
tree9ae569b85a6f1506a402556e44b6b6a81485efbc /src/nvim/ex_cmds.c
parent6ea45031d5841d3227c545f213d0903b951e40be (diff)
downloadrneovim-e025f5a5b30a1ef92e88fed0f0c548d2240d30c0.tar.gz
rneovim-e025f5a5b30a1ef92e88fed0f0c548d2240d30c0.tar.bz2
rneovim-e025f5a5b30a1ef92e88fed0f0c548d2240d30c0.zip
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().
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index e937961b44..8cccf08e11 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -189,7 +189,7 @@ void do_ascii(exarg_T *eap)
transchar(c), buf1, buf2, cval, cval, cval);
}
- msg_multiline(IObuff, 0, true, false, &need_clear);
+ msg_multiline(cstr_as_string(IObuff), 0, true, false, &need_clear);
off += (size_t)utf_ptr2len(data); // needed for overlong ascii?
}
@@ -224,7 +224,7 @@ void do_ascii(exarg_T *eap)
c, c, c);
}
- msg_multiline(IObuff, 0, true, false, &need_clear);
+ msg_multiline(cstr_as_string(IObuff), 0, true, false, &need_clear);
off += (size_t)utf_ptr2len(data + off); // needed for overlong ascii?
}