fix(difftool): ensure standardized locale for diff output parsing #38853

Always pass LC_ALL=C to diff when parsing its output.

Closes #38838

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2026-04-07 19:02:11 +02:00
committed by GitHub
parent 2df2e72e0a
commit 382a1c40c2

View File

@@ -117,7 +117,9 @@ local function diff_dirs_diffr(left_dir, right_dir, opt)
table.insert(args, left_dir)
table.insert(args, right_dir)
local lines = vim.fn.systemlist(args)
-- Force English locale so that we can rely on the output format
local result = vim.system(args, { text = true, env = { LC_ALL = 'C' } }):wait()
local lines = vim.split(result.stdout or '', '\n', { trimempty = true })
local qf_entries = {}
for _, line in ipairs(lines) do