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:
luukvbaal
2024-11-17 19:21:50 +01:00
committed by GitHub
parent 6ea45031d5
commit e025f5a5b3
9 changed files with 64 additions and 77 deletions

View File

@@ -277,10 +277,8 @@ describe('startup', function()
-- nvim <vim args> -l foo.lua <vim args>
assert_l_out(
-- luacheck: ignore 611 (Line contains only whitespaces)
[[
wrap
bufs:
nvim args: 7
lua args: { "-c", "set wrap?",