fix: correctly parse filenames with special chars in git_status (#2296)
This commit is contained in:
committed by
GitHub
parent
0326347eba
commit
b24fdfdb25
@@ -314,7 +314,7 @@ git.status = function(opts)
|
|||||||
|
|
||||||
local gen_new_finder = function()
|
local gen_new_finder = function()
|
||||||
local expand_dir = vim.F.if_nil(opts.expand_dir, true)
|
local expand_dir = vim.F.if_nil(opts.expand_dir, true)
|
||||||
local git_cmd = { "git", "status", "-s", "--", "." }
|
local git_cmd = { "git", "status", "-z", "--", "." }
|
||||||
|
|
||||||
if expand_dir then
|
if expand_dir then
|
||||||
table.insert(git_cmd, #git_cmd - 1, "-u")
|
table.insert(git_cmd, #git_cmd - 1, "-u")
|
||||||
@@ -332,7 +332,7 @@ git.status = function(opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return finders.new_table {
|
return finders.new_table {
|
||||||
results = output,
|
results = vim.split(output[1], " | ||||||