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

main
olimorris 2021-10-24 19:55:22 +01:00
parent 082a52e999
commit ff30e8b4cc
1 changed files with 1 additions and 1 deletions

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, "%%")