fix(message): concatenate multi-chunk nvim_echo({err}) for exception message #38131

Problem:  Exception error message only prints the first chunk of a
          multi-chunk nvim_echo() message.
Solution: Concatenate consecutive message chunks in the exception
          message list.
This commit is contained in:
luukvbaal
2026-03-10 15:35:24 +01:00
committed by GitHub
parent c8693051a8
commit b47b0caba8
3 changed files with 19 additions and 6 deletions

View File

@@ -445,6 +445,13 @@ describe('API', function()
api.nvim_exec2('hi VisualNC', { output = true })
eq('VisualNC xxx cleared', api.nvim_exec2('hi VisualNC', { output = true }).output)
end)
it('captures multi-chunk err nvim_echo() #36883', function()
eq(
'nvim_exec2(), line 1: Vim(call):abc',
pcall_err(request, 'nvim_exec2', 'call nvim_echo([["a"],["b"],["c"] ], 0, #{err:1})', {})
)
end)
end)
describe('nvim_command', function()