From dacdcdf47b8feec87d187302d1a880bcd6f54d25 Mon Sep 17 00:00:00 2001 From: Lukasz Samson Date: Sat, 1 Oct 2022 21:03:03 +0200 Subject: [PATCH] Do not crash when handling code lenses for untitled Fixes https://github.com/elixir-lsp/elixir-ls/issues/734 --- apps/language_server/lib/language_server/server.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/language_server/lib/language_server/server.ex b/apps/language_server/lib/language_server/server.ex index f052c88c5..f87003ff5 100644 --- a/apps/language_server/lib/language_server/server.ex +++ b/apps/language_server/lib/language_server/server.ex @@ -863,7 +863,7 @@ defmodule ElixirLS.LanguageServer.Server do defp get_test_code_lenses( state = %__MODULE__{project_dir: project_dir}, - uri, + "file:" <> _ = uri, source_file, true = _enabled, true = _umbrella @@ -888,7 +888,7 @@ defmodule ElixirLS.LanguageServer.Server do defp get_test_code_lenses( %__MODULE__{project_dir: project_dir}, - uri, + "file:" <> _ = uri, source_file, true = _enabled, false = _umbrella