diff options
author | Hirokazu Hata <h.hata.ai.t@gmail.com> | 2020-03-30 21:30:24 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-30 14:30:24 +0200 |
commit | 4139678f97ee556ab142031a1ed5c7580278b64f (patch) | |
tree | 0788bfa6572893e4de325d7522387b9854ce7c12 /runtime/lua/vim/uri.lua | |
parent | e700a88bb6bdc96f4d62a384aecd3bec2040ac3b (diff) | |
download | rneovim-4139678f97ee556ab142031a1ed5c7580278b64f.tar.gz rneovim-4139678f97ee556ab142031a1ed5c7580278b64f.tar.bz2 rneovim-4139678f97ee556ab142031a1ed5c7580278b64f.zip |
vim.uri: fix uri_to_fname (#12059)
fix: #12056
If the colon of the drive letter of windows is URI encoded,
it doesn't match the expected pattern, so decode it first.
Diffstat (limited to 'runtime/lua/vim/uri.lua')
-rw-r--r-- | runtime/lua/vim/uri.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/uri.lua b/runtime/lua/vim/uri.lua index 1065f84f4c..d91fb7ffd3 100644 --- a/runtime/lua/vim/uri.lua +++ b/runtime/lua/vim/uri.lua @@ -70,6 +70,7 @@ local function uri_from_bufnr(bufnr) end local function uri_to_fname(uri) + uri = uri_decode(uri) -- TODO improve this. if is_windows_file_uri(uri) then uri = uri:gsub('^file:///', '') @@ -77,7 +78,7 @@ local function uri_to_fname(uri) else uri = uri:gsub('^file://', '') end - return uri_decode(uri) + return uri end -- Return or create a buffer for a uri. |