mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
docs: stricter bufname and bufnr types (#27454)
This commit is contained in:

committed by
GitHub

parent
4860cc5bdc
commit
1c7b0b9d5f
4
runtime/lua/vim/_meta/vimfn.lua
generated
4
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -582,7 +582,7 @@ function vim.fn.bufloaded(buf) end
|
||||
--- echo bufname("file2") " name of buffer where "file2" matches.
|
||||
--- <
|
||||
---
|
||||
--- @param buf? any
|
||||
--- @param buf? integer|string
|
||||
--- @return string
|
||||
function vim.fn.bufname(buf) end
|
||||
|
||||
@@ -599,7 +599,7 @@ function vim.fn.bufname(buf) end
|
||||
--- number necessarily exist, because ":bwipeout" may have removed
|
||||
--- them. Use bufexists() to test for the existence of a buffer.
|
||||
---
|
||||
--- @param buf? any
|
||||
--- @param buf? integer|string
|
||||
--- @param create? any
|
||||
--- @return integer
|
||||
function vim.fn.bufnr(buf, create) end
|
||||
|
@@ -809,7 +809,7 @@ M.funcs = {
|
||||
<
|
||||
]=],
|
||||
name = 'bufname',
|
||||
params = { { 'buf', 'any' } },
|
||||
params = { { 'buf', 'integer|string' } },
|
||||
returns = 'string',
|
||||
signature = 'bufname([{buf}])',
|
||||
},
|
||||
@@ -832,7 +832,7 @@ M.funcs = {
|
||||
|
||||
]=],
|
||||
name = 'bufnr',
|
||||
params = { { 'buf', 'any' }, { 'create', 'any' } },
|
||||
params = { { 'buf', 'integer|string' }, { 'create', 'any' } },
|
||||
returns = 'integer',
|
||||
signature = 'bufnr([{buf} [, {create}]])',
|
||||
},
|
||||
|
Reference in New Issue
Block a user