Skip to content

Commit

Permalink
prevent display in REPL from erroring on non standard prompts (#49383)
Browse files Browse the repository at this point in the history
(cherry picked from commit bb118c9)
  • Loading branch information
KristofferC committed Apr 22, 2023
1 parent f89f5d9 commit cbc4f49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stdlib/REPL/src/REPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ function display(d::REPLDisplay, mime::MIME"text/plain", x)
if d.repl isa LineEditREPL
mistate = d.repl.mistate
mode = LineEdit.mode(mistate)
LineEdit.write_output_prefix(io, mode, get(io, :color, false)::Bool)
if mode isa LineEdit.Prompt
LineEdit.write_output_prefix(io, mode, get(io, :color, false)::Bool)
end
end
get(io, :color, false)::Bool && write(io, answer_color(d.repl))
if isdefined(d.repl, :options) && isdefined(d.repl.options, :iocontext)
Expand Down

0 comments on commit cbc4f49

Please sign in to comment.