From 1508618d4c35dafee2b82726d2d27fae4e314386 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 20 Aug 2022 09:35:09 +0800 Subject: vim-patch:8.2.3712: cannot use Vim9 lambda for 'tagfunc' Problem: Cannot use Vim9 lambda for 'tagfunc'. Solution: Make it work, add more tests. (Yegappan Lakshmanan, closes vim/vim#9250) https://github.com/vim/vim/commit/05e59e3a9ffddbf93c7af02cd2ba1d0f822d4625 Omit Vim9 script in code and comment out in tests. Co-authored-by: Yegappan Lakshmanan --- runtime/doc/options.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 883585116d..a14dc1b99e 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -320,7 +320,15 @@ or a function reference or a lambda function. Examples: set opfunc=MyOpFunc set opfunc=function('MyOpFunc') set opfunc=funcref('MyOpFunc') - let &opfunc = "{t -> MyOpFunc(t)}" + set opfunc={a\ ->\ MyOpFunc(a)} + " set using a funcref variable + let Fn = function('MyTagFunc') + let &tagfunc = string(Fn) + " set using a lambda expression + let &tagfunc = "{t -> MyTagFunc(t)}" + " set using a variable with lambda expression + let L = {a, b, c -> MyTagFunc(a, b , c)} + let &tagfunc = string(L) < Setting the filetype -- cgit