Skip to content

Commit 664bcda

Browse files
authored
add comment
1 parent 7fdea0a commit 664bcda

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/REPL/src/REPLCompletions.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,11 @@ function complete_keyword_argument(partial::String, last_idx::Int, context_modul
10821082
kwargs_flag == 2 && return fail # one of the previous kwargs is invalid
10831083

10841084
methods = Completion[]
1085+
# limit the number of methods to prevent performance issues while allowing
1086+
# completions for nearly all common functions. This is distinct from the other
1087+
# uses of MAX_METHOD_COMPLETIONS, which primarily used to limit the number
1088+
# of methods to _display_ before showing an alternative message; here we're
1089+
# searching a larger number to find a subset that contains matching kwargs
10851090
complete_methods!(methods, funct, Any[Vararg{Any}], kwargs_ex, shift ? -1 : 500, kwargs_flag == 1)
10861091
# TODO: use args_ex instead of Any[Vararg{Any}] and only provide kwarg completion for
10871092
# method calls compatible with the current arguments.

0 commit comments

Comments
 (0)