docs(uri): number → integer (#22515)

This commit is contained in:
Jaehwang Jung 2023-03-04 22:05:16 +09:00 committed by GitHub
parent 6a20c29dcd
commit ccd2cc1abd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -2007,7 +2007,7 @@ uri_from_bufnr({bufnr}) *vim.uri_from_bufnr()*
Get a URI from a bufnr
Parameters: ~
• {bufnr} (number)
• {bufnr} (integer)
Return: ~
(string) URI
@ -2029,7 +2029,7 @@ uri_to_bufnr({uri}) *vim.uri_to_bufnr()*
• {uri} (string)
Return: ~
(number) bufnr
(integer) bufnr
uri_to_fname({uri}) *vim.uri_to_fname()*
Get a filename from a URI

View File

@ -80,7 +80,7 @@ local URI_SCHEME_PATTERN = '^([a-zA-Z]+[a-zA-Z0-9.+-]*):.*'
local WINDOWS_URI_SCHEME_PATTERN = '^([a-zA-Z]+[a-zA-Z0-9.+-]*):[a-zA-Z]:.*'
--- Get a URI from a bufnr
---@param bufnr number
---@param bufnr integer
---@return string URI
local function uri_from_bufnr(bufnr)
local fname = vim.api.nvim_buf_get_name(bufnr)
@ -123,7 +123,7 @@ end
--- Creates a new unloaded buffer if no buffer for the uri already exists.
--
---@param uri string
---@return number bufnr
---@return integer bufnr
local function uri_to_bufnr(uri)
return vim.fn.bufadd(uri_to_fname(uri))
end