From 9a785eb8f0199ac47ce8bb9e9b6103de5ad8e3a7 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Sun, 21 Jan 2024 10:49:44 -0800 Subject: fix: handle windows line endings (#274) --- lua/conform/runner.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/conform/runner.lua') diff --git a/lua/conform/runner.lua b/lua/conform/runner.lua index 3d9df8b..725e824 100644 --- a/lua/conform/runner.lua +++ b/lua/conform/runner.lua @@ -341,7 +341,7 @@ local function run_formatter(bufnr, formatter, config, ctx, input_lines, opts, c local stat = assert(uv.fs_fstat(fd)) local content = assert(uv.fs_read(fd, stat.size)) uv.fs_close(fd) - output = vim.split(content, "\n", { plain = true }) + output = vim.split(content, "\r?\n", {}) else output = stdout end -- cgit v1.2.3-70-g09d2