mirror of
https://github.com/neovim/neovim.git
synced 2026-08-31 03:13:48 +00:00
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)
05e59e3a9f
Omit Vim9 script in code and comment out in tests.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user