feat: add configuration to fix encoding of output of find_command in find_files (#2232)

This commit is contained in:
zbq
2022-11-29 05:41:37 +08:00
committed by GitHub
parent 4d77743a8e
commit 3c2e5fb23e
3 changed files with 30 additions and 21 deletions

View File

@@ -192,8 +192,15 @@ do
return rawget(t, rawget(lookup_keys, k))
end
return function(line)
return setmetatable({ line }, mt_file_entry)
if opts.file_entry_encoding then
return function(line)
line = vim.iconv(line, opts.file_entry_encoding, "utf8")
return setmetatable({ line }, mt_file_entry)
end
else
return function(line)
return setmetatable({ line }, mt_file_entry)
end
end
end
end