File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -609,24 +609,24 @@ defmodule IEx.Autocomplete do
609609 end
610610
611611 defp match_modules ( hint , elixir_root? ) do
612- modules =
612+ loaded =
613613 for mod <- :erlang . loaded ( ) ,
614614 str = Atom . to_string ( mod ) ,
615615 String . starts_with? ( str , hint ) ,
616616 do: str
617617
618- modules =
619- if elixir_root? and String . starts_with? ( "Elixir.Elixir" , hint ) ,
620- do: [ "Elixir.Elixir" | modules ] ,
621- else: modules
622-
623- modules =
618+ from_apps =
624619 case :code . get_mode ( ) do
625- :interactive -> modules ++ match_modules_from_applications ( hint )
626- _otherwise -> modules
620+ :interactive -> match_modules_from_applications ( hint )
621+ _otherwise -> [ ]
627622 end
628623
629- :lists . usort ( modules )
624+ elixir =
625+ if elixir_root? and String . starts_with? ( "Elixir.Elixir" , hint ) ,
626+ do: [ "Elixir.Elixir" ] ,
627+ else: [ ]
628+
629+ :lists . usort ( elixir ++ loaded ++ from_apps )
630630 end
631631
632632 defp match_modules_from_applications ( hint ) do
You can’t perform that action at this time.
0 commit comments