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
|
local tmp_out
|
||||||
if tmp then
|
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)
|
os.remove(tmp)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user