mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
fix(api): nvim_echo free text memory with invalid highlight (#31243)
Fix regression from #31195
This commit is contained in:
parent
10beeee06f
commit
6ea45031d5
@ -823,9 +823,6 @@ HlMessage parse_hl_msg(Array chunks, Error *err)
|
||||
int hl_id = 0;
|
||||
if (chunk.size == 2) {
|
||||
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 }));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user