fix(util): replace vim.fn.readfile with io.open
This commit is contained in:
+6
-1
@@ -132,7 +132,12 @@ function Util.format(opts)
|
||||
|
||||
local tmp_out
|
||||
if tmp then
|
||||
tmp_out = table.concat(vim.fn.readfile(tmp), "\n")
|
||||
local f = io.open(tmp, "r")
|
||||
if not f then
|
||||
return
|
||||
end
|
||||
tmp_out = f:read("*a")
|
||||
f:close()
|
||||
os.remove(tmp)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user