Print output from gnuplot process

This commit is contained in:
Giorgio Calderone 2020-04-01 14:53:33 +02:00
parent 451e869668
commit 6c3b83c3b1

View File

@ -302,13 +302,16 @@ function GPSession(sid::Symbol)
end
if line == "GNUPLOT_CAPTURE_BEGIN"
saveOutput = true
elseif line == "GNUPLOT_CAPTURE_END"
put!(channel, line)
saveOutput = false
else
if ((line != "") && (line != "GNUPLOT_CAPTURE_END") && (options.verbose)) ||
!isnothing(match(r"clipboard", line))
printstyled(color=:cyan, "GNUPLOT ($sid) -> $line\n")
if line != ""
if options.verbose || !saveOutput
printstyled(color=:cyan, "GNUPLOT ($sid) -> $line\n")
end
end
(saveOutput) && (put!(channel, line))
(line == "GNUPLOT_CAPTURE_END") && (saveOutput = false)
end
end
delete!(sessions, sid)