Add check for Pluto.jl interactive notebook.

This commit is contained in:
Jarvist Moore Frost 2020-09-21 21:02:08 +01:00
parent 83c59ae682
commit 084dd63059

View File

@ -236,11 +236,12 @@ const sessions = OrderedDict{Symbol, Session}()
const options = Options()
function __init__()
# Check whether we are running in a IJulia or Juno session.
# Check whether we are running in an IJulia, Juno or Pluto session.
# (copied from Gaston.jl).
options.gpviewer = !(
((isdefined(Main, :IJulia) && Main.IJulia.inited) ||
(isdefined(Main, :Juno) && Main.Juno.isactive()))
(isdefined(Main, :Juno) && Main.Juno.isactive()) ||
(isdefined(Main, :PlutoRunner)) )
)
end