mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
fix(api): nvim_echo free text memory with invalid highlight (#31243)
Fix regression from #31195
This commit is contained in:
@@ -823,9 +823,6 @@ HlMessage parse_hl_msg(Array chunks, Error *err)
|
|||||||
int hl_id = 0;
|
int hl_id = 0;
|
||||||
if (chunk.size == 2) {
|
if (chunk.size == 2) {
|
||||||
hl_id = object_to_hl_id(chunk.items[1], "text highlight", err);
|
hl_id = object_to_hl_id(chunk.items[1], "text highlight", err);
|
||||||
if (ERROR_SET(err)) {
|
|
||||||
goto free_exit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
kv_push(hl_msg, ((HlMessageChunk){ .text = str, .hl_id = hl_id }));
|
kv_push(hl_msg, ((HlMessageChunk){ .text = str, .hl_id = hl_id }));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user