Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions stdlib/REPL/src/REPLCompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1109,8 +1109,8 @@ function complete_identifiers!(suggestions::Vector{Completion}, @nospecialize(ff
end
isexpr(ex, :incomplete) && (ex = nothing)
elseif isexpr(ex, (:using, :import))
arg1 = ex.args[1]
if isexpr(arg1, :.)
arglast = ex.args[end] # focus on completion to the last argument
if isexpr(arglast, :.)
# We come here for cases like:
# - `string`: "using Mod1.Mod2.M"
# - `ex`: :(using Mod1.Mod2)
Expand All @@ -1120,7 +1120,7 @@ function complete_identifiers!(suggestions::Vector{Completion}, @nospecialize(ff
# Note that `ffunc` is set to `module_filter` within `completions`
ex = nothing
firstdot = true
for arg = arg1.args
for arg = arglast.args
if arg === :.
# override `context_module` if multiple `.` accessors are used
if firstdot
Expand Down
12 changes: 6 additions & 6 deletions stdlib/REPL/test/replcompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2219,6 +2219,12 @@ let s = "using Base."
@test res
@test "BinaryPlatforms" in c
end
# JuliaLang/julia#53999
let s = "using Base.Sort, Base.Th"
c, r, res = test_complete_context(s)
@test res
@test "Threads" in c
end
# test cases with the `.` accessor
module Issue52922
module Inner1
Expand Down Expand Up @@ -2302,9 +2308,3 @@ let s = "TestImplicitUsing.@asse"
@test res
@test "@assert" in c
end
# JuliaLang/julia#53999
let s = "using Base.Thre"
c, r, res = test_complete_context(s)
@test res
@test "Threads" in c
end