diff --git a/src/goto.jl b/src/goto.jl index 867fa2da..8d9e3528 100644 --- a/src/goto.jl +++ b/src/goto.jl @@ -155,7 +155,16 @@ gen_new_cache() = PathItemsMap() function toplevelgotoitems(word, mod, path, text) key = string(mod) pathitemsmap = if haskey(SYMBOLSCACHE, key) - SYMBOLSCACHE[key] + if haskey(SYMBOLSCACHE[key], path) + SYMBOLSCACHE[key] + else + orig = SYMBOLSCACHE[key] + maybe = collecttoplevelitems(mod, path, text) + if maybe !== nothing + merge!(orig, maybe) + end + orig + end else maybe = collecttoplevelitems(mod, path, text) if maybe === nothing