Skip to content

Commit

Permalink
Merge pull request #4072 from JuliaLang/backports-release-1.11
Browse files Browse the repository at this point in the history
[release-1.11] 1.11 backports
  • Loading branch information
IanButterworth authored Nov 4, 2024
2 parents af1088b + c3be332 commit 2c62541
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ext/REPLExt/REPLExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function create_mode(repl::REPL.AbstractREPL, main::LineEdit.Prompt)
return pkg_mode
end

function repl_init(repl::REPL.AbstractREPL)
function repl_init(repl::REPL.LineEditREPL)
main_mode = repl.interface.modes[1]
pkg_mode = create_mode(repl, main_mode)
push!(repl.interface.modes, pkg_mode)
Expand Down Expand Up @@ -304,7 +304,13 @@ end

function __init__()
if isdefined(Base, :active_repl)
repl_init(Base.active_repl)
if Base.active_repl isa REPL.LineEditREPL
repl_init(Base.active_repl)
else
# TODO: not sure what to do here..
# LineEditREPL Is the only type of REPL that has the `interface` field that
# init_repl accesses.
end
else
atreplinit() do repl
if isinteractive() && repl isa REPL.LineEditREPL
Expand Down

0 comments on commit 2c62541

Please sign in to comment.