diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-11-11 12:26:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-11 12:26:35 +0100 |
commit | d0e78b587195d201d643f3e131dd1ea951d906db (patch) | |
tree | 2a08bef2c02751daf28a33be8c57049554b57726 /src/nvim/api/private/helpers.c | |
parent | 7919aa9102e1b9b7a9f7feaea6b134a98f5b60fc (diff) | |
parent | 4f9260d06a48216862ebb34fc33744486b058f58 (diff) | |
download | rneovim-d0e78b587195d201d643f3e131dd1ea951d906db.tar.gz rneovim-d0e78b587195d201d643f3e131dd1ea951d906db.tar.bz2 rneovim-d0e78b587195d201d643f3e131dd1ea951d906db.zip |
Merge pull request #27813 from luukvbaal/msgid
feat(ext_messages): add hl_id to ext_messages chunks
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index e1fb4ed732..d21caf7ed0 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -824,16 +824,15 @@ HlMessage parse_hl_msg(Array chunks, Error *err) String str = copy_string(chunk.items[0].data.string, NULL); - int attr = 0; + int hl_id = 0; if (chunk.size == 2) { String hl = chunk.items[1].data.string; if (hl.size > 0) { // TODO(bfredl): use object_to_hl_id and allow integer - int hl_id = syn_check_group(hl.data, hl.size); - attr = hl_id > 0 ? syn_id2attr(hl_id) : 0; + hl_id = syn_check_group(hl.data, hl.size); } } - kv_push(hl_msg, ((HlMessageChunk){ .text = str, .attr = attr })); + kv_push(hl_msg, ((HlMessageChunk){ .text = str, .hl_id = hl_id })); } return hl_msg; |