fix: OS detection when using vim.fn.has

remotes/origin/HEAD
Ralf Schmitz Bongiolo 2024-01-02 18:57:14 -04:00 committed by pseudometa
parent 12123cdd40
commit 3dd0e64e68
1 changed files with 2 additions and 2 deletions

View File

@ -172,9 +172,9 @@ function M.trashFile(opts)
cmd("silent! update") cmd("silent! update")
local system local system
if fn.has("macos") == 1 then system = "macos" end if fn.has("mac") == 1 then system = "macos" end
if fn.has("linux") == 1 then system = "linux" end if fn.has("linux") == 1 then system = "linux" end
if fn.has("windows") == 1 then system = "windows" end if fn.has("win32") == 1 then system = "windows" end
local trashCmd = opts.trashCmd or defaultTrashCmds[system] local trashCmd = opts.trashCmd or defaultTrashCmds[system]
-- Use a trash command -- Use a trash command