mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
fix(ui): avoid recursiveness and invalid memory access #28578
Problem: Calling :redraw from vim.ui_attach() callback results in recursive cmdline/message events. Solution: Avoid recursiveness where possible and replace global "call_buf" with separate, temporary buffers for each event so that when a Lua callback for one event fires another event, that does not result in invalid memory access.
This commit is contained in:
@@ -63,7 +63,6 @@ typedef struct {
|
||||
PackerBuffer packer;
|
||||
|
||||
const char *cur_event; ///< name of current event (might get multiple arglists)
|
||||
Array call_buf; ///< buffer for constructing a single arg list (max 16 elements!)
|
||||
|
||||
// We start packing the two outermost msgpack arrays before knowing the total
|
||||
// number of elements. Thus track the location where array size will need
|
||||
|
Reference in New Issue
Block a user