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 #9250)
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 6c589d1..b0000ad 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -379,7 +379,15 @@
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