Skip to content

Commit

Permalink
update goto cache when a module cache exists but there is no correspo…
Browse files Browse the repository at this point in the history
…nding entry for a given file path

this can happen for `Main` module, or when an user manually changes a 
module
  • Loading branch information
aviatesk committed Nov 18, 2020
1 parent a0942e5 commit 9af4b6b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/goto.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9af4b6b

Please sign in to comment.