We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The output prefix logic in display(::REPLDisplay) assumes that the REPL is in normal mode, not in history mode.
display(::REPLDisplay)
This means that code like the following will fail
julia> @async begin try sleep(2) display(Base.Multimedia.displays[2], 2) # Base.Multimedia.displays[2] is the REPLDisplay for me catch err @error "cant display" ex=(err, catch_backtrace()) end end Task (runnable) @0x00007f0ed7f08fb0 julia> 1+1┌ Error: cant display │ ex = │ MethodError: no method matching write_output_prefix(::IOContext{Base.TTY}, ::REPL.LineEdit.PrefixHistoryPrompt, ::Bool) │ │ Closest candidates are: │ write_output_prefix(::IO, ::REPL.LineEdit.Prompt, ::Bool) │ @ REPL ~/.julia/juliaup/julia-1.9.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.9/REPL/src/LineEdit.jl:1472 │ │ Stacktrace: │ [1] (::REPL.var"#55#56"{REPL.REPLDisplay{REPL.LineEditREPL}, MIME{Symbol("text/plain")}, Base.RefValue{Any}})(io::Any) │ @ REPL ~/.julia/juliaup/julia-1.9.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.9/REPL/src/REPL.jl:267 │ [2] with_repl_linfo(f::Any, repl::REPL.LineEditREPL) │ @ REPL ~/.julia/juliaup/julia-1.9.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.9/REPL/src/REPL.jl:555 │ [3] display(d::REPL.REPLDisplay, mime::MIME{Symbol("text/plain")}, x::Any) │ @ REPL ~/.julia/juliaup/julia-1.9.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.9/REPL/src/REPL.jl:262 │ [4] display │ @ ~/.julia/juliaup/julia-1.9.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.9/REPL/src/REPL.jl:279 [inlined] │ [5] macro expansion │ @ ./REPL[4]:4 [inlined] │ [6] (::var"#5#6")() │ @ Main ./task.jl:514 └ @ Main REPL[4]:6
when moving back in the REPL history after starting the async task. Here's an asciinema recording for illustration purposes.
The text was updated successfully, but these errors were encountered:
display
KristofferC
Successfully merging a pull request may close this issue.
The output prefix logic in
display(::REPLDisplay)
assumes that the REPL is in normal mode, not in history mode.This means that code like the following will fail
when moving back in the REPL history after starting the async task. Here's an asciinema recording for illustration purposes.
The text was updated successfully, but these errors were encountered: