Skip to content

Commit b920069

Browse files
IanButterworthDrvi
authored andcommitted
Don't show keymap @error for hints (JuliaLang#56041)
It's too disruptive to show errors for hints. The error will still be shown if tab is pressed. Helps issues like JuliaLang#56037
1 parent 0af0124 commit b920069

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

stdlib/REPL/src/LineEdit.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,13 @@ function check_for_hint(s::MIState)
382382
# Requires making space for them earlier in refresh_multi_line
383383
return clear_hint(st)
384384
end
385-
completions, partial, should_complete = complete_line(st.p.complete, st, s.active_module; hint = true)::Tuple{Vector{String},String,Bool}
385+
386+
completions, partial, should_complete = try
387+
complete_line(st.p.complete, st, s.active_module; hint = true)::Tuple{Vector{String},String,Bool}
388+
catch
389+
@debug "error completing line for hint" exception=current_exceptions()
390+
return clear_hint(st)
391+
end
386392
isempty(completions) && return clear_hint(st)
387393
# Don't complete for single chars, given e.g. `x` completes to `xor`
388394
if length(partial) > 1 && should_complete

0 commit comments

Comments
 (0)