From b2e26ce097aa4cdc12264b9fe4340dd2a18ff5fc Mon Sep 17 00:00:00 2001 From: Lukasz Samson Date: Mon, 6 Nov 2023 17:31:46 +0100 Subject: [PATCH] fix crash if local function fuzzy matches sigil_ --- lib/elixir_sense/providers/suggestion/complete.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/elixir_sense/providers/suggestion/complete.ex b/lib/elixir_sense/providers/suggestion/complete.ex index 70f0fcb6..b9fb1277 100644 --- a/lib/elixir_sense/providers/suggestion/complete.ex +++ b/lib/elixir_sense/providers/suggestion/complete.ex @@ -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)