Fixed writing output in gnuplot repl mode
This commit is contained in:
parent
2d9537edc4
commit
29ad51fe9f
@ -89,6 +89,7 @@ end
|
||||
# ╰───────────────────────────────────────────────────────────────────╯
|
||||
const sessions = OrderedDict{Symbol, Session}()
|
||||
const options = Options()
|
||||
const isgnuplotrepl = [false]
|
||||
|
||||
|
||||
# ╭───────────────────────────────────────────────────────────────────╮
|
||||
@ -311,15 +312,15 @@ function GPSession(sid::Symbol)
|
||||
line *= c
|
||||
for token in pagerTokens() # handle pager interaction
|
||||
if (length(line) == length(token)) && (line == token)
|
||||
break
|
||||
return line
|
||||
end
|
||||
end
|
||||
end
|
||||
# TODO if (line != "GNUPLOT_CAPTURE_BEGIN") &&
|
||||
# TODO (line != "GNUPLOT_CAPTURE_END") &&
|
||||
# TODO (Base.active_repl.mistate.current_mode.prompt == "gnuplot> ")
|
||||
# TODO println(stdout, line)
|
||||
# TODO end
|
||||
if isgnuplotrepl[1] &&
|
||||
(line != "GNUPLOT_CAPTURE_BEGIN") &&
|
||||
(line != "GNUPLOT_CAPTURE_END")
|
||||
println(stdout, line)
|
||||
end
|
||||
return line
|
||||
end
|
||||
|
||||
@ -1734,7 +1735,9 @@ Note: the gnuplot REPL operates only on the default session.
|
||||
"""
|
||||
function repl_init(start_key='>')
|
||||
function repl_exec(s)
|
||||
isgnuplotrepl[1] = true
|
||||
writeread(getsession(), s)
|
||||
isgnuplotrepl[1] = false
|
||||
nothing
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user