Skip to content

Commit

Permalink
fix: check int return value of vim.fn.has (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjuq authored Jan 26, 2024
1 parent b6b9323 commit 0338960
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/flatten/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function M.edit_files(opts)
if nfiles > 0 then
for i, fname in ipairs(files) do
local is_absolute = false
if vim.fn.has("win32") then
if vim.fn.has("win32") == 1 then
is_absolute = string.find(fname, "^%a:") ~= nil
else
is_absolute = string.find(fname, "^/") ~= nil
Expand Down

0 comments on commit 0338960

Please sign in to comment.