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 sessions = OrderedDict{Symbol, Session}()
|
||||||
const options = Options()
|
const options = Options()
|
||||||
|
const isgnuplotrepl = [false]
|
||||||
|
|
||||||
|
|
||||||
# ╭───────────────────────────────────────────────────────────────────╮
|
# ╭───────────────────────────────────────────────────────────────────╮
|
||||||
@ -311,15 +312,15 @@ function GPSession(sid::Symbol)
|
|||||||
line *= c
|
line *= c
|
||||||
for token in pagerTokens() # handle pager interaction
|
for token in pagerTokens() # handle pager interaction
|
||||||
if (length(line) == length(token)) && (line == token)
|
if (length(line) == length(token)) && (line == token)
|
||||||
break
|
return line
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# TODO if (line != "GNUPLOT_CAPTURE_BEGIN") &&
|
if isgnuplotrepl[1] &&
|
||||||
# TODO (line != "GNUPLOT_CAPTURE_END") &&
|
(line != "GNUPLOT_CAPTURE_BEGIN") &&
|
||||||
# TODO (Base.active_repl.mistate.current_mode.prompt == "gnuplot> ")
|
(line != "GNUPLOT_CAPTURE_END")
|
||||||
# TODO println(stdout, line)
|
println(stdout, line)
|
||||||
# TODO end
|
end
|
||||||
return line
|
return line
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1734,7 +1735,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
|
||||||
writeread(getsession(), s)
|
writeread(getsession(), s)
|
||||||
|
isgnuplotrepl[1] = false
|
||||||
nothing
|
nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user