diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-20 09:35:09 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-07 08:24:48 +0800 |
commit | 1508618d4c35dafee2b82726d2d27fae4e314386 (patch) | |
tree | 25f8ab47d771110f80356776f9a076ff6d09043b /runtime | |
parent | b3e9010f4783a51407ec5a5ad9fda1216d4db3fe (diff) | |
download | rneovim-1508618d4c35dafee2b82726d2d27fae4e314386.tar.gz rneovim-1508618d4c35dafee2b82726d2d27fae4e314386.tar.bz2 rneovim-1508618d4c35dafee2b82726d2d27fae4e314386.zip |
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 <yegappan@yahoo.com>
Diffstat (limited to 'runtime')
-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 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 |