Skip to content

Commit cbc4f49

Browse files
committed
prevent display in REPL from erroring on non standard prompts (#49383)
(cherry picked from commit bb118c9)
1 parent f89f5d9 commit cbc4f49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stdlib/REPL/src/REPL.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ function display(d::REPLDisplay, mime::MIME"text/plain", x)
264264
if d.repl isa LineEditREPL
265265
mistate = d.repl.mistate
266266
mode = LineEdit.mode(mistate)
267-
LineEdit.write_output_prefix(io, mode, get(io, :color, false)::Bool)
267+
if mode isa LineEdit.Prompt
268+
LineEdit.write_output_prefix(io, mode, get(io, :color, false)::Bool)
269+
end
268270
end
269271
get(io, :color, false)::Bool && write(io, answer_color(d.repl))
270272
if isdefined(d.repl, :options) && isdefined(d.repl.options, :iocontext)

0 commit comments

Comments
 (0)