Skip to content

Commit

Permalink
Revert "fix(references): clamp line and column numbers"
Browse files Browse the repository at this point in the history
This reverts commit 55ead79.
  • Loading branch information
mhanberg committed Aug 8, 2023
1 parent 3a74a42 commit 7b8418a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/next_ls.ex
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ defmodule NextLS do
%Location{
uri: "file://#{file}",
range: %Range{
start: %Position{line: clamp(start_line - 1), character: clamp(start_column - 1)},
end: %Position{line: clamp(end_line - 1), character: clamp(end_column - 1)}
start: %Position{line: start_line - 1, character: start_column - 1},
end: %Position{line: end_line - 1, character: end_column - 1}
}
}
end
Expand Down Expand Up @@ -712,5 +712,4 @@ defmodule NextLS do
end
end
end
defp clamp(line), do: max(line, 0)
end

0 comments on commit 7b8418a

Please sign in to comment.