fix: vim.fn.has('win32') returns 0 or 1, not a boolean (#8)

This commit is contained in:
FollieHiyuki
2021-10-23 01:24:20 +07:00
committed by GitHub
parent 83af96b1f2
commit 77cf5a6ee1

View File

@ -6,7 +6,7 @@ local e = vim.fn.fnameescape
function M.get_current()
local pattern = "/"
if vim.fn.has("win32") then
if vim.fn.has("win32") == 1 then
pattern = '[\\:]'
end
local name = vim.fn.getcwd():gsub(pattern, "%%")