mirror of
https://github.com/neovim/neovim.git
synced 2025-11-29 21:50:38 +00:00
fix: disallow removing extmarks in on_lines callbacks (#23219)
fix(extmarks): disallow removing extmarks in on_lines callbacks decor_redraw_start (which runs before decor_providers_invoke_lines) gets references for the extmarks on a specific line. If these extmarks are deleted in on_lines callbacks then this results in a heap-use-after-free error. Fixes #22801
This commit is contained in:
@@ -172,7 +172,7 @@ Integer nvim_buf_set_virtual_text(Buffer buffer, Integer src_id, Integer line, A
|
||||
decor.priority = 0;
|
||||
|
||||
extmark_set(buf, ns_id, NULL, (int)line, 0, -1, -1, &decor, true,
|
||||
false, kExtmarkNoUndo);
|
||||
false, kExtmarkNoUndo, NULL);
|
||||
return src_id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user