OSX: use stdout instead of stderr due to rendering issues (#287, #316)

This commit is contained in:
bhagwan 2022-01-18 18:39:43 -08:00
parent e383be5cff
commit e89d5bc009

View File

@ -298,6 +298,8 @@ M.spawn_stdio = function(opts, fn_transform, fn_preprocess)
-- io.stdout:write(("%d %s\n"):format(i, vim.v.argv[i]))
-- end
local is_darwin = vim.loop.os_uname().sysname == 'Darwin'
if opts.debug then
io.stdout:write("[DEBUG]: "..opts.cmd.."\n")
end
@ -383,10 +385,16 @@ M.spawn_stdio = function(opts, fn_transform, fn_preprocess)
function(data)
if stderr then
pipe_write(stderr, data)
else
if is_darwin then
-- for some reason io:stderr causes
-- weird rendering issues on Mac (#316, #287)
io.stdout:write(data)
else
io.stderr:write(data)
end
end
end
return M.spawn({
cwd = opts.cwd,