aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-07 10:26:54 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-07 14:25:32 +0800
commit42e44d6d334bda8b97afe9e34a819ab293e5e10a (patch)
tree4087d6827987d2d6360af4f2df093ff4f4dfb806 /runtime
parentf91d200c056940e92277e59ffd6507c4db1973d8 (diff)
downloadrneovim-42e44d6d334bda8b97afe9e34a819ab293e5e10a.tar.gz
rneovim-42e44d6d334bda8b97afe9e34a819ab293e5e10a.tar.bz2
rneovim-42e44d6d334bda8b97afe9e34a819ab293e5e10a.zip
vim-patch:8.2.3751: cannot assign a lambda to an option that takes a function
Problem: Cannot assign a lambda to an option that takes a function. Solution: Automatically convert the lambda to a string. (Yegappan Lakshmanan, closes vim/vim#9286) https://github.com/vim/vim/commit/6409553b6e3b4de4e1d72b8ee5445595214581ff Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/options.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 37f8ea4b20..b18d40e56f 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -315,7 +315,8 @@ Note: In the future more global options can be made |global-local|. Using
*option-value-function*
Some options ('completefunc', 'imactivatefunc', 'imstatusfunc', 'omnifunc',
'operatorfunc', 'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc') are set to
-a function name or a function reference or a lambda function. Examples:
+a function name or a function reference or a lambda function. When using a
+lambda it will be converted to the name, e.g. "<lambda>123". Examples:
>
set opfunc=MyOpFunc
set opfunc=function('MyOpFunc')
@@ -325,10 +326,10 @@ a function name or a function reference or a lambda function. Examples:
let Fn = function('MyTagFunc')
let &tagfunc = string(Fn)
" set using a lambda expression
- let &tagfunc = "{t -> MyTagFunc(t)}"
+ 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)
+ let &tagfunc = L
<
Setting the filetype