From f8680d009741d01e137aeb2232aa7e033cd70d7b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 16 Jan 2025 09:27:08 +0800 Subject: vim-patch:9.1.1013: Vim9: Regression caused by patch v9.1.0646 Problem: Vim9: Regression caused by patch v9.1.0646 Solution: Translate the function name before invoking it in call() (Yegappan Lakshmanan) fixes: vim/vim#16430 closes: vim/vim#16445 https://github.com/vim/vim/commit/6289f9159102e0855bedc566636b5e7ca6ced72c N/A patch: vim-patch:8.2.4176: Vim9: cannot use imported function with call() Co-authored-by: Yegappan Lakshmanan --- test/functional/vimscript/ctx_functions_spec.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/functional/vimscript/ctx_functions_spec.lua') diff --git a/test/functional/vimscript/ctx_functions_spec.lua b/test/functional/vimscript/ctx_functions_spec.lua index 873e4f820d..85a74c0ab6 100644 --- a/test/functional/vimscript/ctx_functions_spec.lua +++ b/test/functional/vimscript/ctx_functions_spec.lua @@ -188,7 +188,10 @@ describe('context functions', function() function RestoreFuncs() call ctxpop() endfunction + + let g:sid = expand('') ]]) + local sid = api.nvim_get_var('sid') eq('Hello, World!', exec_capture([[call Greet('World')]])) eq( @@ -200,11 +203,11 @@ describe('context functions', function() call('DeleteSFuncs') eq( - 'function Greet, line 1: Vim(call):E117: Unknown function: s:greet', + ('function Greet, line 1: Vim(call):E117: Unknown function: %sgreet'):format(sid), pcall_err(command, [[call Greet('World')]]) ) eq( - 'function GreetAll, line 1: Vim(call):E117: Unknown function: s:greet_all', + ('function GreetAll, line 1: Vim(call):E117: Unknown function: %sgreet_all'):format(sid), pcall_err(command, [[call GreetAll('World', 'One', 'Two', 'Three')]]) ) -- cgit