mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 16:36:30 +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:
@@ -8616,7 +8616,7 @@ bool eval_has_provider(const char *feat, bool throw_if_fast)
|
||||
}
|
||||
|
||||
if (throw_if_fast && !nlua_is_deferred_safe()) {
|
||||
semsg(e_luv_api_disabled, "Vimscript function");
|
||||
semsg(e_fast_api_disabled, "Vimscript function");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user