Skip to content

Commit

Permalink
fix crash if local function fuzzy matches sigil_
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Nov 6, 2023
1 parent 86f3f1f commit b2e26ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/elixir_sense/providers/suggestion/complete.ex
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ defmodule ElixirSense.Providers.Suggestion.Complete do
defp expand_sigil(%State.Env{} = env, %Metadata{} = metadata, cursor_position) do
sigils =
match_local("sigil_", false, env, metadata, cursor_position)
|> Enum.filter(fn %{name: name} -> String.starts_with?(name, "sigil_") end)
|> Enum.map(fn %{name: "sigil_" <> rest} = local ->
%{local | name: "~" <> rest}
end)
Expand Down

0 comments on commit b2e26ce

Please sign in to comment.