mirror of
https://github.com/neovim/neovim.git
synced 2026-07-16 06:10:39 +00:00
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>
(cherry picked from commit 382a1c40c2)
This commit is contained in:
committed by
github-actions[bot]
parent
a7214c0719
commit
6cb5012e36
@@ -117,7 +117,9 @@ local function diff_dirs_diffr(left_dir, right_dir, opt)
|
|||||||
table.insert(args, left_dir)
|
table.insert(args, left_dir)
|
||||||
table.insert(args, right_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 = {}
|
local qf_entries = {}
|
||||||
|
|
||||||
for _, line in ipairs(lines) do
|
for _, line in ipairs(lines) do
|
||||||
|
|||||||
Reference in New Issue
Block a user