mirror of
https://github.com/neovim/neovim.git
synced 2026-04-19 14:00:49 +00:00
feat(ext_messages): add hl_id to ext_messages chunks
Problem: Ext_messages chunks only contain the highlight attr id, which
is not very useful for vim.ui_attach() consumers.
Solotion: Add highlight group id to message chunks, which can easily be
used to highlight text in the TUI through nvim_buf_set_extmark():
hl_group = synIDattr(id, "name").
This commit is contained in:
@@ -151,9 +151,9 @@ describe('vim.ui_attach', function()
|
||||
{
|
||||
'msg_history_show',
|
||||
{
|
||||
{ 'echomsg', { { 0, 'message1' } } },
|
||||
{ '', { { 0, 'message2' } } },
|
||||
{ 'echomsg', { { 0, 'message3' } } },
|
||||
{ 'echomsg', { { 0, 'message1', 0 } } },
|
||||
{ '', { { 0, 'message2', 0 } } },
|
||||
{ 'echomsg', { { 0, 'message3', 0 } } },
|
||||
},
|
||||
},
|
||||
}, actual, vim.inspect(actual))
|
||||
|
||||
Reference in New Issue
Block a user