Skip to content

Commit 8c0964f

Browse files
authored
Merge pull request #20 from Pangoraw/update_to_nightly
update to nightly changes
2 parents 1e6f0f5 + 326cc65 commit 8c0964f

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "FuzzyCompletions"
22
uuid = "fb4132e2-a121-4a70-b8a1-d5b831dcdcc2"
33
authors = ["Shuhei Kadowaki <[email protected]>"]
4-
version = "0.5.4"
4+
version = "0.5.5"
55

66
[deps]
77
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

src/FuzzyCompletions.jl

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,6 @@ import REPL.REPLCompletions:
404404
subscript_regex,
405405
superscripts,
406406
superscript_regex,
407-
afterusing,
408407
dict_identifier_key
409408

410409
@static if VERSION v"1.10.0-DEV.941"
@@ -460,7 +459,10 @@ function complete_keyword_argument(partial, last_idx, context_module)
460459
end
461460

462461
suggestions = Completion[KeywordArgumentCompletion(kwarg, partial) for kwarg in kwargs]
463-
repl_completions = @static if VERSION v"1.10.0-DEV.981"
462+
repl_completions = @static if VERSION v"1.12.0-DEV.639"
463+
REPL.REPLCompletions.complete_symbol!(REPL.REPLCompletions.Completion[],
464+
nothing, last_word, context_module)
465+
elseif VERSION v"1.10.0-DEV.981"
464466
REPL.REPLCompletions.complete_symbol(nothing, last_word, Returns(true), context_module)
465467
else
466468
REPL.REPLCompletions.complete_symbol(last_word, (mod,x)->true, context_module)
@@ -601,7 +603,13 @@ end
601603

602604
end # @static if isdefined(Base, :TOML)
603605

604-
function completions(string::String, pos::Int, context_module::Module = Main, shift::Bool=true;
606+
after_using_or_import(string, startpos) = @static if VERSION v"1.12.0-DEV.699"
607+
REPL.REPLCompletions.get_import_mode(string) (:using_module, :import_module)
608+
else
609+
REPL.REPLCompletions.afterusing(string, startpos)
610+
end
611+
612+
function completions(string::String, pos::Int, context_module::Module = Main, shift::Bool=true;
605613
enable_questionmark_methods::Bool = true,
606614
enable_dict_keys::Bool = true,
607615
enable_expanduser::Bool = true,
@@ -741,7 +749,7 @@ function completions(string::String, pos::Int, context_module::Module = Main, sh
741749
ffunc = (mod,x)->true
742750
suggestions = Completion[]
743751
comp_keywords = true
744-
if enable_packages && afterusing(string, startpos)
752+
if enable_packages && after_using_or_import(string, startpos)
745753
# We're right after using or import. Let's look only for packages
746754
# and modules we can reach from here
747755

0 commit comments

Comments
 (0)