mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +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:
@@ -2081,11 +2081,12 @@ static void display_showcmd(void)
|
||||
|
||||
if (ui_has(kUIMessages)) {
|
||||
MAXSIZE_TEMP_ARRAY(content, 1);
|
||||
MAXSIZE_TEMP_ARRAY(chunk, 2);
|
||||
MAXSIZE_TEMP_ARRAY(chunk, 3);
|
||||
if (!showcmd_is_clear) {
|
||||
// placeholder for future highlight support
|
||||
ADD_C(chunk, INTEGER_OBJ(0));
|
||||
ADD_C(chunk, CSTR_AS_OBJ(showcmd_buf));
|
||||
ADD_C(chunk, INTEGER_OBJ(0));
|
||||
ADD_C(content, ARRAY_OBJ(chunk));
|
||||
}
|
||||
ui_call_msg_showcmd(content);
|
||||
|
Reference in New Issue
Block a user