Skip to content

Commit 790e18d

Browse files
committed
fix selection ranges on elixir 1.16.2
the fix for map position did not make it to the release
1 parent df03608 commit 790e18d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/language_server/lib/language_server/ast_utils.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ defmodule ElixirLS.LanguageServer.AstUtils do
130130
cond do
131131
form == :%{} ->
132132
column =
133-
if Version.match?(System.version(), "< 1.16.2") do
133+
if Version.match?(System.version(), "< 1.17.0") do
134134
# workaround elixir bug
135135
# https://github.com/elixir-lang/elixir/commit/fd4e6b530c0e010712b06909c89820b08e49c238
136136
column - 1

apps/language_server/lib/language_server/providers/selection_ranges.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ defmodule ElixirLS.LanguageServer.Providers.SelectionRanges do
362362
range(start_line, start_character, end_line, end_character) ->
363363
start_character =
364364
if match?({:%{}, _, _}, ast) and match?({:%, _, _}, parent_ast_from_stack) and
365-
Version.match?(System.version(), "< 1.16.2") do
365+
Version.match?(System.version(), "< 1.17.0") do
366366
# workaround elixir bug
367367
# https://github.com/elixir-lang/elixir/commit/fd4e6b530c0e010712b06909c89820b08e49c238
368368
# undo column offset for structs inner map node

0 commit comments

Comments
 (0)