From 51853b82bc95a7b62875d07a0ade6cfa0bdd0b5b Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Wed, 19 Mar 2025 19:04:08 +0100 Subject: fix(messages): incorrect error message splitting and kind #32990 Problem: Message kind logic for emitting an error message is convoluted and still results in emitting an unfinished message earlier than wanted. Solution: Ensure emsg_multiline() always sets the kind wanted by the caller and doesn't isn't unset to logic for emitting the source message. Caller is responsible for making sure multiple message chunks are not emitted as multiple events by setting `msg_ext_skip_flush`... --- test/functional/ui/messages_spec.lua | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'test/functional/ui/messages_spec.lua') diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 1e18cddca1..9b01150411 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -181,20 +181,12 @@ describe('ui/ext_messages', function() cmdline = { { abort = false } }, messages = { { - content = { { 'Error detected while processing :', 9, 6 } }, - history = true, - kind = 'emsg', - }, - { - content = { { 'E605: Exception not caught: foo', 9, 6 } }, + content = { + { 'Error detected while processing :\nE605: Exception not caught: foo', 9, 6 }, + }, history = true, kind = 'emsg', }, - { - content = { { 'Press ENTER or type command to continue', 6, 18 } }, - history = false, - kind = 'return_prompt', - }, }, } -- cgit