1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 11:10:04 +08:00

fix(format): check formatted_context and stdin

This commit is contained in:
Eric Wong 2024-04-16 14:36:31 +08:00
parent c9fd7f91c7
commit ccfc031441

View File

@ -37,7 +37,7 @@ local function on_exit(id, code, single)
else
formatted_context = stdout
end
if table.concat(stdout, '\n') == table.concat(current_task.stdin, '\n') then
if table.concat(formatted_context, '\n') == table.concat(current_task.stdin, '\n') then
util.msg('no necessary changes')
else
util.msg((current_task.formatter.name or current_task.formatter.exe) .. ' formatted buffer')