diff --git a/lib/next_ls/db.ex b/lib/next_ls/db.ex index 3a356df6..48a9a600 100644 --- a/lib/next_ls/db.ex +++ b/lib/next_ls/db.ex @@ -142,23 +142,6 @@ defmodule NextLS.DB do {{meta[:line], col}, {meta[:line], col + String.length(identifier |> to_string() |> String.replace("Elixir.", ""))}} - __query__( - {conn, s.logger}, - ~Q""" - DELETE FROM 'references' AS refs - WHERE refs.file = ? - AND (? <= refs.start_line - AND refs.start_line <= ? - AND ? <= refs.start_column - AND refs.start_column <= ?) - OR (? <= refs.end_line - AND refs.end_line <= ? - AND ? <= refs.end_column - AND refs.end_column <= ?); - """, - [file, start_line, end_line, start_column, end_column, start_line, end_line, start_column, end_column] - ) - __query__( {conn, s.logger}, ~Q""" diff --git a/lib/next_ls/definition.ex b/lib/next_ls/definition.ex index 5cd7ab6a..bc9f0b1a 100644 --- a/lib/next_ls/definition.ex +++ b/lib/next_ls/definition.ex @@ -19,9 +19,8 @@ defmodule NextLS.Definition do AND ? <= refs.end_line AND refs.start_column <= ? AND ? <= refs.end_column - ORDER BY refs.id desc + ORDER BY refs.id asc LIMIT 1; - """, [file, line, line, col, col] ) do