Skip to content

Commit

Permalink
fix: coalesce nil start line to 1 (#182)
Browse files Browse the repository at this point in the history
Fixes #160
  • Loading branch information
dvic committed Aug 14, 2023
1 parent c57cca4 commit 9864fc4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/next_ls/db.ex
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ defmodule NextLS.DB do
module: module
} = reference

line = meta[:line] || 1
col = meta[:column] || 0

{{start_line, start_column}, {end_line, end_column}} =
{{meta[:line], col},
{meta[:line], col + String.length(identifier |> to_string() |> String.replace("Elixir.", ""))}}
{start_line, start_column} = {line, col}
{end_line, end_column} = {line, col + String.length(identifier |> to_string() |> String.replace("Elixir.", ""))}

__query__(
{conn, s.logger},
Expand Down

0 comments on commit 9864fc4

Please sign in to comment.