1
mirror of https://github.com/neovim/neovim.git synced 2025-01-01 17:23:36 -07:00

fix(ui): msg_ext_set_kind for nvim_echo ()

This commit is contained in:
Shougo 2022-10-04 22:22:42 +09:00 committed by GitHub
parent 04f763b208
commit 28fbdd3385
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions
src/nvim
test/functional/ui

View File

@ -269,12 +269,12 @@ void msg_multiattr(HlMessage hl_msg, const char *kind, bool history)
msg_start();
msg_clr_eos();
bool need_clear = false;
msg_ext_set_kind(kind);
for (uint32_t i = 0; i < kv_size(hl_msg); i++) {
HlMessageChunk chunk = kv_A(hl_msg, i);
msg_multiline_attr((const char *)chunk.text.data, chunk.attr,
true, &need_clear);
}
msg_ext_set_kind(kind);
if (history && kv_size(hl_msg)) {
add_msg_hist_multiattr(NULL, 0, 0, true, hl_msg);
}

View File

@ -869,7 +869,7 @@ stack traceback:
{1:~ }|
{1:~ }|
]], messages={
{ content = { { "wow, ", 7 }, { "such\n\nvery ", 2 }, { "color", 10 } }, kind = "" }
{ content = { { "wow, ", 7 }, { "such\n\nvery ", 2 }, { "color", 10 } }, kind = "echomsg" }
}}
feed ':ls<cr>'
@ -880,7 +880,7 @@ stack traceback:
{1:~ }|
{1:~ }|
]], messages={
{ content = { { '\n 1 %a "[No Name]" line 1' } }, kind = "echomsg" }
{ content = { { '\n 1 %a "[No Name]" line 1' } }, kind = "" }
}}
feed ':messages<cr>'