Skip to content

Commit

Permalink
try_prompt_pkg_add: highlight 2nd env on "other" (JuliaLang#3429)
Browse files Browse the repository at this point in the history
(cherry picked from commit e13a2ea)
  • Loading branch information
StefanKarpinski authored and IanButterworth committed Apr 11, 2023
1 parent 412d6a6 commit 3fe135d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/REPLMode/REPLMode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -746,10 +746,11 @@ function try_prompt_pkg_add(pkgs::Vector{Symbol})
push!(shown_envs, expanded_env)
end
menu = TerminalMenus.RadioMenu(option_list, keybindings=keybindings, pagesize=length(option_list))
default = min(2, length(option_list))
print(ctx.io, "\e[1A\e[1G\e[0J") # go up one line, to the start, and clear it
printstyled(ctx.io, ""; color=:green)
choice = try
TerminalMenus.request("Select environment:", menu)
TerminalMenus.request("Select environment:", menu, cursor=default)
catch err
if err isa InterruptException # if ^C is entered
println(ctx.io)
Expand Down

0 comments on commit 3fe135d

Please sign in to comment.