From 77cf5a6ee162013b97237ff25450080401849f85 Mon Sep 17 00:00:00 2001 From: FollieHiyuki Date: Sat, 23 Oct 2021 01:24:20 +0700 Subject: [PATCH] fix: vim.fn.has('win32') returns 0 or 1, not a boolean (#8) --- lua/persistence/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/persistence/init.lua b/lua/persistence/init.lua index 780c14b..829ebb1 100644 --- a/lua/persistence/init.lua +++ b/lua/persistence/init.lua @@ -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, "%%")