commit z.lua

This commit is contained in:
skywind3000 committed 2019-02-08 16:08:47 +08:00
1 parent 8ef9d09c92
commit 961c09dc3b
1 file changed
+6 -1
+6 -1
View File
@@ -1367,7 +1367,12 @@ function z_cd(patterns)
return os.path.expand('~')
end
if os.path.isabs(last) and os.path.isdir(last) then
return os.path.norm(last)
local size = #patterns
if size <= 1 then
return os.path.norm(last)
elseif last ~= '/' and last ~= '\\' then
return os.path.norm(last)
end
end
local M = z_match(patterns, Z_METHOD, Z_SUBDIR)
if M == nil then