aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehwang Jung <tomtomjhj@gmail.com>2023-03-04 22:05:16 +0900
committerGitHub <noreply@github.com>2023-03-04 13:05:16 +0000
commitccd2cc1abd69f677edabd0b66dfd9689eeee54b9 (patch)
treed5208f1256ab7c1ca03f34c431bee1128f4f84be
parent6a20c29dcd050fee011ec1c451b5e70940152885 (diff)
downloadrneovim-ccd2cc1abd69f677edabd0b66dfd9689eeee54b9.tar.gz
rneovim-ccd2cc1abd69f677edabd0b66dfd9689eeee54b9.tar.bz2
rneovim-ccd2cc1abd69f677edabd0b66dfd9689eeee54b9.zip
docs(uri): number → integer (#22515)
-rw-r--r--runtime/doc/lua.txt4
-rw-r--r--runtime/lua/vim/uri.lua4
2 files changed, 4 insertions, 4 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index e3e0665025..38ddff13bd 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -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
diff --git a/runtime/lua/vim/uri.lua b/runtime/lua/vim/uri.lua
index d6b0b7410e..38759fcdc0 100644
--- a/runtime/lua/vim/uri.lua
+++ b/runtime/lua/vim/uri.lua
@@ -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