fix(messages): single msg_show event for :global command #37728

Problem:  "first" parameter added in 912388f5 for grouping printed lines
          in a single event is ineffective for the :global command.
Solution: Only set the message kind for the first printed line during a
          :global command.
This commit is contained in:
luukvbaal
2026-02-05 14:37:20 +01:00
committed by GitHub
parent bf68ba40a0
commit f1dcde6cba
2 changed files with 19 additions and 1 deletions

View File

@@ -468,6 +468,20 @@ describe('ui/ext_messages', function()
messages = { { content = { { 'line 1\nline ' } }, kind = 'list_cmd' } },
})
-- single message for :global command #37726
feed(':g/line<CR>')
screen:expect({
grid = [[
line 1 |
^line |
{1:~ }|*3
]],
messages = {
{ content = { { '\n' } }, kind = '' },
{ content = { { 'line 1\nline ' } }, kind = 'list_cmd' },
},
})
command('command Foo Bar')
feed(':command<CR>')
screen:expect({