mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
fix(messages)!: vim.ui_attach message callbacks are unsafe
Problem: Lua callbacks for "msg_show" events with vim.ui_attach() are executed when it is not safe. Solution: Disallow non-fast API calls for "msg_show" event callbacks. Automatically detach callback after excessive errors. Make sure fast APIs do not modify Nvim state.
This commit is contained in:
@@ -87,9 +87,9 @@ describe('vim.uv', function()
|
||||
screen:expect([[
|
||||
|
|
||||
{2: }|
|
||||
{3:Error executing luv callback:} |
|
||||
{3:Error executing callback:} |
|
||||
{3:[string "<nvim>"]:5: E5560: nvim_set_var must not }|
|
||||
{3:be called in a lua loop callback} |
|
||||
{3:be called in a fast event context} |
|
||||
{3:stack traceback:} |
|
||||
{3: [C]: in function 'nvim_set_var'} |
|
||||
{3: [string "<nvim>"]:5: in function <[string }|
|
||||
|
Reference in New Issue
Block a user