diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-12-01 10:30:07 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-01 10:30:07 +0000 |
commit | 05e59e3a9ffddbf93c7af02cd2ba1d0f822d4625 (patch) | |
tree | b178bddbd7f7ea74e4dee6dbf762f79ff6e6aaa6 /runtime/doc | |
parent | 56a8ffdb6e903615ed824a503f5fa6382b5b3df5 (diff) |
patch 8.2.3712: cannot use Vim9 lambda for 'tagfunc'v8.2.3712
Problem: Cannot use Vim9 lambda for 'tagfunc'.
Solution: Make it work, add more tests. (Yegappan Lakshmanan, closes #9250)
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/options.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 6c589d1429..b0000adf9e 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -379,7 +379,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 |