Minor changes

This commit is contained in:
Giorgio Calderone 2020-04-12 00:36:11 +02:00
parent 3505403499
commit 41d7cb991a

View File

@ -293,9 +293,10 @@ function GPSession(sid::Symbol)
line = "" line = ""
while true while true
c = read(stream, Char) c = read(stream, Char)
print(c)
(c == '\r') && continue (c == '\r') && continue
(c == '\n') && break (c == '\n') && break
if c == Char(0x1b) if c == Char(0x1b) # sixel
buf = Vector{UInt8}() buf = Vector{UInt8}()
push!(buf, UInt8(c)) push!(buf, UInt8(c))
while true while true
@ -309,17 +310,17 @@ function GPSession(sid::Symbol)
continue continue
end end
line *= c line *= c
for token in pagerTokens() for token in pagerTokens() # handle pager interaction
if (length(line) == length(token)) && (line == token) if (length(line) == length(token)) && (line == token)
return line break
end end
end end
end end
if (line != "GNUPLOT_CAPTURE_BEGIN") && # TODO if (line != "GNUPLOT_CAPTURE_BEGIN") &&
(line != "GNUPLOT_CAPTURE_END") && # TODO (line != "GNUPLOT_CAPTURE_END") &&
(Base.active_repl.mistate.current_mode.prompt == "gnuplot> ") # TODO (Base.active_repl.mistate.current_mode.prompt == "gnuplot> ")
println(stdout, line) # TODO println(stdout, line)
end # TODO end
return line return line
end end