aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/loop_spec.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2024-06-20 14:48:06 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2024-11-14 13:23:11 +0100
commitde48fbbd5f8800bd7f1909a6fb41e53e871cf74c (patch)
treeb394143235cc15259d6bf8b08729da73d5633ba4 /test/functional/lua/loop_spec.lua
parent7d771c3eeef5b4dca9ebc5ed6f7ca03f2b26b6bc (diff)
downloadrneovim-de48fbbd5f8800bd7f1909a6fb41e53e871cf74c.tar.gz
rneovim-de48fbbd5f8800bd7f1909a6fb41e53e871cf74c.tar.bz2
rneovim-de48fbbd5f8800bd7f1909a6fb41e53e871cf74c.zip
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.
Diffstat (limited to 'test/functional/lua/loop_spec.lua')
-rw-r--r--test/functional/lua/loop_spec.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/lua/loop_spec.lua b/test/functional/lua/loop_spec.lua
index 0c72843fad..52a8fec0bf 100644
--- a/test/functional/lua/loop_spec.lua
+++ b/test/functional/lua/loop_spec.lua
@@ -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 }|