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

@@ -142,7 +142,7 @@ describe('vim.ui_attach', function()
'msg_history_show',
{
{ 'echomsg', { { 0, 'message1', 0 } } },
{ '', { { 0, 'message2', 0 } } },
{ 'lua_print', { { 0, 'message2', 0 } } },
{ 'echomsg', { { 0, 'message3', 0 } } },
},
},