From 4f9260d06a48216862ebb34fc33744486b058f58 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Fri, 8 Mar 2024 14:44:58 +0100 Subject: 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"). --- test/functional/lua/ui_event_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/lua') diff --git a/test/functional/lua/ui_event_spec.lua b/test/functional/lua/ui_event_spec.lua index 0a6deaa41c..52045b76ff 100644 --- a/test/functional/lua/ui_event_spec.lua +++ b/test/functional/lua/ui_event_spec.lua @@ -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)) -- cgit