mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
vim-patch:17ad852: runtime(doc): update return types for builtin functions
fixes: vim/vim#17273
credit: Github user @msoyka2024
17ad852a62
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
10
runtime/doc/builtin.txt
generated
10
runtime/doc/builtin.txt
generated
@@ -1528,6 +1528,8 @@ cursor({list})
|
|||||||
position within a <Tab> or after the last character.
|
position within a <Tab> or after the last character.
|
||||||
Returns 0 when the position could be set, -1 otherwise.
|
Returns 0 when the position could be set, -1 otherwise.
|
||||||
|
|
||||||
|
Returns 0 when the position could be set, -1 otherwise.
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
• {list} (`integer[]`)
|
• {list} (`integer[]`)
|
||||||
|
|
||||||
@@ -2457,7 +2459,7 @@ finddir({name} [, {path} [, {count}]]) *finddir()*
|
|||||||
• {count} (`integer?`)
|
• {count} (`integer?`)
|
||||||
|
|
||||||
Return: ~
|
Return: ~
|
||||||
(`any`)
|
(`string|string[]`)
|
||||||
|
|
||||||
findfile({name} [, {path} [, {count}]]) *findfile()*
|
findfile({name} [, {path} [, {count}]]) *findfile()*
|
||||||
Just like |finddir()|, but find a file instead of a directory.
|
Just like |finddir()|, but find a file instead of a directory.
|
||||||
@@ -2470,10 +2472,10 @@ findfile({name} [, {path} [, {count}]]) *findfile()*
|
|||||||
Parameters: ~
|
Parameters: ~
|
||||||
• {name} (`string`)
|
• {name} (`string`)
|
||||||
• {path} (`string?`)
|
• {path} (`string?`)
|
||||||
• {count} (`any?`)
|
• {count} (`integer?`)
|
||||||
|
|
||||||
Return: ~
|
Return: ~
|
||||||
(`any`)
|
(`string|string[]`)
|
||||||
|
|
||||||
flatten({list} [, {maxdepth}]) *flatten()*
|
flatten({list} [, {maxdepth}]) *flatten()*
|
||||||
Flatten {list} up to {maxdepth} levels. Without {maxdepth}
|
Flatten {list} up to {maxdepth} levels. Without {maxdepth}
|
||||||
@@ -8942,6 +8944,8 @@ setcursorcharpos({list})
|
|||||||
call cursor(4, 3)
|
call cursor(4, 3)
|
||||||
< positions the cursor on the first character '여'.
|
< positions the cursor on the first character '여'.
|
||||||
|
|
||||||
|
Returns 0 when the position could be set, -1 otherwise.
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
• {list} (`integer[]`)
|
• {list} (`integer[]`)
|
||||||
|
|
||||||
|
10
runtime/lua/vim/_meta/vimfn.lua
generated
10
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -1350,6 +1350,8 @@ function vim.fn.cursor(lnum, col, off) end
|
|||||||
--- position within a <Tab> or after the last character.
|
--- position within a <Tab> or after the last character.
|
||||||
--- Returns 0 when the position could be set, -1 otherwise.
|
--- Returns 0 when the position could be set, -1 otherwise.
|
||||||
---
|
---
|
||||||
|
--- Returns 0 when the position could be set, -1 otherwise.
|
||||||
|
---
|
||||||
--- @param list integer[]
|
--- @param list integer[]
|
||||||
--- @return any
|
--- @return any
|
||||||
function vim.fn.cursor(list) end
|
function vim.fn.cursor(list) end
|
||||||
@@ -2197,7 +2199,7 @@ function vim.fn.filter(expr1, expr2) end
|
|||||||
--- @param name string
|
--- @param name string
|
||||||
--- @param path? string
|
--- @param path? string
|
||||||
--- @param count? integer
|
--- @param count? integer
|
||||||
--- @return any
|
--- @return string|string[]
|
||||||
function vim.fn.finddir(name, path, count) end
|
function vim.fn.finddir(name, path, count) end
|
||||||
|
|
||||||
--- Just like |finddir()|, but find a file instead of a directory.
|
--- Just like |finddir()|, but find a file instead of a directory.
|
||||||
@@ -2209,8 +2211,8 @@ function vim.fn.finddir(name, path, count) end
|
|||||||
---
|
---
|
||||||
--- @param name string
|
--- @param name string
|
||||||
--- @param path? string
|
--- @param path? string
|
||||||
--- @param count? any
|
--- @param count? integer
|
||||||
--- @return any
|
--- @return string|string[]
|
||||||
function vim.fn.findfile(name, path, count) end
|
function vim.fn.findfile(name, path, count) end
|
||||||
|
|
||||||
--- Flatten {list} up to {maxdepth} levels. Without {maxdepth}
|
--- Flatten {list} up to {maxdepth} levels. Without {maxdepth}
|
||||||
@@ -8150,6 +8152,8 @@ function vim.fn.setcursorcharpos(lnum, col, off) end
|
|||||||
--- call cursor(4, 3)
|
--- call cursor(4, 3)
|
||||||
--- <positions the cursor on the first character '여'.
|
--- <positions the cursor on the first character '여'.
|
||||||
---
|
---
|
||||||
|
--- Returns 0 when the position could be set, -1 otherwise.
|
||||||
|
---
|
||||||
--- @param list integer[]
|
--- @param list integer[]
|
||||||
--- @return any
|
--- @return any
|
||||||
function vim.fn.setcursorcharpos(list) end
|
function vim.fn.setcursorcharpos(list) end
|
||||||
|
@@ -1779,6 +1779,7 @@ M.funcs = {
|
|||||||
position within a <Tab> or after the last character.
|
position within a <Tab> or after the last character.
|
||||||
Returns 0 when the position could be set, -1 otherwise.
|
Returns 0 when the position could be set, -1 otherwise.
|
||||||
|
|
||||||
|
Returns 0 when the position could be set, -1 otherwise.
|
||||||
]=],
|
]=],
|
||||||
name = 'cursor',
|
name = 'cursor',
|
||||||
params = { { 'list', 'integer[]' } },
|
params = { { 'list', 'integer[]' } },
|
||||||
@@ -2795,6 +2796,7 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
name = 'finddir',
|
name = 'finddir',
|
||||||
params = { { 'name', 'string' }, { 'path', 'string' }, { 'count', 'integer' } },
|
params = { { 'name', 'string' }, { 'path', 'string' }, { 'count', 'integer' } },
|
||||||
|
returns = 'string|string[]',
|
||||||
signature = 'finddir({name} [, {path} [, {count}]])',
|
signature = 'finddir({name} [, {path} [, {count}]])',
|
||||||
},
|
},
|
||||||
findfile = {
|
findfile = {
|
||||||
@@ -2810,7 +2812,8 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'findfile',
|
name = 'findfile',
|
||||||
params = { { 'name', 'string' }, { 'path', 'string' }, { 'count', 'any' } },
|
params = { { 'name', 'string' }, { 'path', 'string' }, { 'count', 'integer' } },
|
||||||
|
returns = 'string|string[]',
|
||||||
signature = 'findfile({name} [, {path} [, {count}]])',
|
signature = 'findfile({name} [, {path} [, {count}]])',
|
||||||
},
|
},
|
||||||
flatten = {
|
flatten = {
|
||||||
@@ -9872,6 +9875,7 @@ M.funcs = {
|
|||||||
call cursor(4, 3)
|
call cursor(4, 3)
|
||||||
<positions the cursor on the first character '여'.
|
<positions the cursor on the first character '여'.
|
||||||
|
|
||||||
|
Returns 0 when the position could be set, -1 otherwise.
|
||||||
]=],
|
]=],
|
||||||
name = 'setcursorcharpos',
|
name = 'setcursorcharpos',
|
||||||
params = { { 'list', 'integer[]' } },
|
params = { { 'list', 'integer[]' } },
|
||||||
|
Reference in New Issue
Block a user