Skip to content

Commit

Permalink
update completions
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Aug 1, 2022
1 parent 3b3cd2e commit 7409957
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/completions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ end
mod = getmodule(m)

cs, replace, shouldcomplete = try
REPLCompletions.completions(line, lastindex(line), mod)
catch err
@static if hasmethod(REPLCompletions.completions, (String,Int,Module,Bool))
REPLCompletions.completions(line, lastindex(line), mod, force)
else
REPLCompletions.completions(line, lastindex(line), mod)
end
catch
# might error when e.g. type inference fails
REPLCompletions.Completion[], 1:0, false
end
Expand Down Expand Up @@ -137,8 +141,12 @@ end
mod = getmodule(m)

cs, replace, shouldcomplete = try
FuzzyCompletions.completions(line, lastindex(line), mod)
catch err
@static if hasmethod(FuzzyCompletions.completions, (String,Int,Module,Bool))
FuzzyCompletions.completions(line, lastindex(line), mod, force)
else
FuzzyCompletions.completions(line, lastindex(line), mod)
end
catch
# might error when e.g. type inference fails
FuzzyCompletions.Completion[], 1:0, false
end
Expand Down

0 comments on commit 7409957

Please sign in to comment.