Skip to content

Commit

Permalink
don't show keymap @error for hints
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Oct 8, 2024
1 parent 4cdd864 commit c77f754
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stdlib/REPL/src/LineEdit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ function check_for_hint(s::MIState)
# Requires making space for them earlier in refresh_multi_line
return clear_hint(st)
end
set_action!(s, :check_for_hint)
completions, partial, should_complete = complete_line(st.p.complete, st, s.active_module; hint = true)::Tuple{Vector{String},String,Bool}
isempty(completions) && return clear_hint(st)
# Don't complete for single chars, given e.g. `x` completes to `xor`
Expand Down Expand Up @@ -2871,7 +2872,9 @@ function prompt!(term::TextTerminal, prompt::ModalInterface, s::MIState = init_s
try
status = fcn(s, kdata)
catch e
@error "Error in the keymap" exception=e,catch_backtrace()
if s.current_action != :check_for_hint
@error "Error in the keymap" exception=e,catch_backtrace()
end
# try to cleanup and get `s` back to its original state before returning
transition(s, :reset)
transition(s, old_state)
Expand Down

0 comments on commit c77f754

Please sign in to comment.