diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-09-04 06:20:23 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-09-04 18:39:55 +0800 |
commit | 21dad0dcf34330cfd7c765485b19d0ac46ce8565 (patch) | |
tree | 09b0e9b6637ebc04a51bd5df89d180651e415226 | |
parent | 6f7d55d3d987560d65220522e3705704abca5325 (diff) | |
download | rneovim-21dad0dcf34330cfd7c765485b19d0ac46ce8565.tar.gz rneovim-21dad0dcf34330cfd7c765485b19d0ac46ce8565.tar.bz2 rneovim-21dad0dcf34330cfd7c765485b19d0ac46ce8565.zip |
vim-patch:088e8e344352
Update runtime files.
https://github.com/vim/vim/commit/088e8e3443520dec91a384081e66445a104810bb
Also cherry-pick "partial" tag from a later runtime update.
-rw-r--r-- | runtime/doc/builtin.txt | 11 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 5 | ||||
-rw-r--r-- | runtime/doc/quickref.txt | 1 |
3 files changed, 16 insertions, 1 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 50087db4ea..3ca6f04389 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2507,7 +2507,7 @@ funcref({name} [, {arglist}] [, {dict}]) Can also be used as a |method|: > GetFuncname()->funcref([arg]) < - *function()* *E700* *E922* *E923* + *function()* *partial* *E700* *E922* *E923* function({name} [, {arglist}] [, {dict}]) Return a |Funcref| variable that refers to function {name}. {name} can be the name of a user defined function or an @@ -2537,6 +2537,15 @@ function({name} [, {arglist}] [, {dict}]) < Invokes the function as with: > call Callback('one', 'two', 'name') +< With a |method|: > + func Callback(one, two, three) + ... + let Partial = function('Callback', ['two']) + ... + eval 'one'->Partial('three') +< Invokes the function as with: > + call Callback('one', 'two', 'three') + < The function() call can be nested to add more arguments to the Funcref. The extra arguments are appended to the list of arguments. Example: > diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3fbf1ee136..bce0189cfb 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2622,6 +2622,11 @@ It is also possible to use `:eval`. It does not support a range, but does allow for method chaining, e.g.: > eval GetList()->Filter()->append('$') +A function can also be called as part of evaluating an expression or when it +is used as a method: > + let x = GetList() + let y = GetList()->Filter() + AUTOMATICALLY LOADING FUNCTIONS ~ *autoload-functions* diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 6f16db5cc2..9f3993506a 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -649,6 +649,7 @@ Short explanation of each option: *option-list* 'complete' 'cpt' specify how Insert mode completion works 'completefunc' 'cfu' function to be used for Insert mode completion 'completeopt' 'cot' options for Insert mode completion +'completeslash' 'csl' like 'shellslash' for completion 'concealcursor' 'cocu' whether concealable text is hidden in cursor line 'conceallevel' 'cole' whether concealable text is shown or hidden 'confirm' 'cf' ask what to do about unsaved/read-only files |