From e42050f4aed5ee332cc95bacd622bfbc9a31dbe0 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron <886074+teto@users.noreply.github.com> Date: Tue, 21 Oct 2025 16:46:03 +0200 Subject: feat(vimscript): log function name in "fast" message #32616 --- test/functional/lua/vim_spec.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/functional/lua/vim_spec.lua') diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index 7d2db461b6..d5143cb033 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -1355,6 +1355,22 @@ describe('lua stdlib', function() ) end) + it('vim.call fails in fast context', function() + local screen = Screen.new(120, 10) + exec_lua([[ + local timer = vim.uv.new_timer() + timer:start(0, 0, function() + timer:close() + vim.call('sin', 0.0) + end) + ]]) + screen:expect({ + any = pesc('E5560: Vimscript function "sin" must not be called in a fast event context'), + }) + feed('') + assert_alive() + end) + it('vim.fn errors when calling API function', function() matches( 'Tried to call API function with vim.fn: use vim.api.nvim_get_current_line instead', -- cgit