gnuplot repl no longer requires a global state to print returned strings
This commit is contained in:
parent
5482b64f71
commit
ef99fe5e4a
@ -118,7 +118,6 @@ end
|
|||||||
# ╰───────────────────────────────────────────────────────────────────╯
|
# ╰───────────────────────────────────────────────────────────────────╯
|
||||||
const sessions = OrderedDict{Symbol, Session}()
|
const sessions = OrderedDict{Symbol, Session}()
|
||||||
const options = Options()
|
const options = Options()
|
||||||
const isgnuplotrepl = [false]
|
|
||||||
|
|
||||||
|
|
||||||
# ╭───────────────────────────────────────────────────────────────────╮
|
# ╭───────────────────────────────────────────────────────────────────╮
|
||||||
@ -358,9 +357,6 @@ function GPSession(sid::Symbol)
|
|||||||
saveOutput = false
|
saveOutput = false
|
||||||
else
|
else
|
||||||
if line != ""
|
if line != ""
|
||||||
if isgnuplotrepl[1]
|
|
||||||
println(stdout, line)
|
|
||||||
end
|
|
||||||
if options.verbose || !saveOutput
|
if options.verbose || !saveOutput
|
||||||
printstyled(color=:cyan, "GNUPLOT ($sid) -> $line\n")
|
printstyled(color=:cyan, "GNUPLOT ($sid) -> $line\n")
|
||||||
end
|
end
|
||||||
@ -1784,9 +1780,9 @@ Note: the gnuplot REPL operates only on the default session.
|
|||||||
"""
|
"""
|
||||||
function repl_init(start_key='>')
|
function repl_init(start_key='>')
|
||||||
function repl_exec(s)
|
function repl_exec(s)
|
||||||
isgnuplotrepl[1] = true
|
for s in writeread(getsession(), s)
|
||||||
writeread(getsession(), s)
|
println(s)
|
||||||
isgnuplotrepl[1] = false
|
end
|
||||||
nothing
|
nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user