forked from aniani/vim
Update runtime files
This commit is contained in:
@@ -1671,7 +1671,7 @@ complete_info([{what}]) *complete_info()*
|
||||
typed text only, or the last completion after
|
||||
no item is selected when using the <Up> or
|
||||
<Down> keys)
|
||||
inserted Inserted string. [NOT IMPLEMENT YET]
|
||||
inserted Inserted string. [NOT IMPLEMENTED YET]
|
||||
|
||||
*complete_info_mode*
|
||||
mode values are:
|
||||
@@ -3038,10 +3038,10 @@ function({name} [, {arglist}] [, {dict}])
|
||||
Funcref. The extra arguments are appended to the list of
|
||||
arguments. Example: >
|
||||
func Callback(arg1, arg2, name)
|
||||
...
|
||||
"...
|
||||
let Func = function('Callback', ['one'])
|
||||
let Func2 = function(Func, ['two'])
|
||||
...
|
||||
"...
|
||||
call Func2('name')
|
||||
< Invokes the function as with: >
|
||||
call Callback('one', 'two', 'name')
|
||||
@@ -3051,22 +3051,23 @@ function({name} [, {arglist}] [, {dict}])
|
||||
function Callback() dict
|
||||
echo "called for " .. self.name
|
||||
endfunction
|
||||
...
|
||||
"...
|
||||
let context = {"name": "example"}
|
||||
let Func = function('Callback', context)
|
||||
...
|
||||
"...
|
||||
call Func() " will echo: called for example
|
||||
< The use of function() is not needed when there are no extra
|
||||
arguments, these two are equivalent: >
|
||||
arguments, these two are equivalent, if Callback() is defined
|
||||
as context.Callback(): >
|
||||
let Func = function('Callback', context)
|
||||
let Func = context.Callback
|
||||
|
||||
< The argument list and the Dictionary can be combined: >
|
||||
function Callback(arg1, count) dict
|
||||
...
|
||||
"...
|
||||
let context = {"name": "example"}
|
||||
let Func = function('Callback', ['one'], context)
|
||||
...
|
||||
"...
|
||||
call Func(500)
|
||||
< Invokes the function as with: >
|
||||
call context.Callback('one', 500)
|
||||
|
||||
Reference in New Issue
Block a user