Skip to content

Commit

Permalink
fix: coalesce nil start line to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
dvic authored and mhanberg committed Aug 14, 2023
1 parent c57cca4 commit 9c4e1fc
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 9c4e1fc

Please sign in to comment.