mirror of
https://github.com/neovim/neovim.git
synced 2026-02-20 09:19:43 +10:00
fix(messages): adjust msg_show "empty" kind logic (#37427)
Problem: A message ending in an unprintable character may emit a
msg_show event with the "empty" kind. No empty message event
for echom "".
Solution: Adjust conditions for emitting "empty" msg_show events.
This commit is contained in:
@@ -502,8 +502,8 @@ describe('ui/ext_messages', function()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Empty messages
|
||||
feed(':echo "foo" | echo "" | lua print()<CR>')
|
||||
-- 3 empty message events, not for an empty chunk after a non-printable character
|
||||
feed(':echo "foo\\n" | echo "" | echom "" | lua print()<CR>')
|
||||
screen:expect({
|
||||
grid = [[
|
||||
line 1 |
|
||||
@@ -511,7 +511,8 @@ describe('ui/ext_messages', function()
|
||||
{1:~ }|*3
|
||||
]],
|
||||
messages = {
|
||||
{ content = { { 'foo' } }, kind = 'echo' },
|
||||
{ content = { { 'foo\n' } }, kind = 'echo' },
|
||||
{ content = {}, kind = 'empty' },
|
||||
{ content = {}, kind = 'empty' },
|
||||
{ content = {}, kind = 'empty' },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user