vim-patch:8.2.3468: problem with :cd when editing file in non-existent directory

Problem:    Problem with :cd when editing file in non-existent directory. (Yee
            Cheng Chin)
Solution:   Prepend the current directory to get the full path. (closes vim/vim#8903)
c6376c7984
This commit is contained in:
zeertzjq
2021-11-19 20:07:04 +08:00
parent f71be1f87b
commit 0f58ba10e2
5 changed files with 44 additions and 13 deletions

View File

@@ -143,8 +143,8 @@ describe('URI methods', function()
end)
it('uri_to_fname returns non-file scheme URI without authority unchanged', function()
eq('zipfile:/path/to/archive.zip%3A%3Afilename.txt', exec_lua [[
return vim.uri_to_fname('zipfile:/path/to/archive.zip%3A%3Afilename.txt')
eq('zipfile:///path/to/archive.zip%3A%3Afilename.txt', exec_lua [[
return vim.uri_to_fname('zipfile:///path/to/archive.zip%3A%3Afilename.txt')
]])
end)
end)
@@ -186,7 +186,7 @@ describe('URI methods', function()
end)
it('uri_to_bufnr & uri_from_bufnr returns original uri for non-file uris without authority', function()
local uri = 'zipfile:/path/to/archive.zip%3A%3Afilename.txt'
local uri = 'zipfile:///path/to/archive.zip%3A%3Afilename.txt'
local test_case = string.format([[
local uri = '%s'
return vim.uri_from_bufnr(vim.uri_to_bufnr(uri))