anchor.diff:              undefined
       end.
   
  -find_record_field_use(_Record, [], _Column) ->
  +find_record_field_use(_Record, [], _Column, _Line) ->
       undefined;
  -find_record_field_use(Record, [{record_field, _, {atom, {_, StartColumn}, Field}, _} | Tail], Column) ->
  +find_record_field_use(Record, [{record_field, _, {atom, {L, StartColumn}, Field}, _} | Tail], Column, Line) ->
       EndColumn = StartColumn + length(atom_to_list(Field)),
       if
  -        StartColumn =< Column andalso Column =< EndColumn -> {field, Record, Field};
  -        true -> find_record_field_use(Record, Tail, Column)
  +        L =:= Line, StartColumn =< Column, Column =< EndColumn -> {field, Record, Field};
  +        true -> find_record_field_use(Record, Tail, Column, Line)
       end.
   
   find_element({module_use, Module}, _CurrentFileSyntaxTree, _CurrentFile) ->
  -    {SyntaxTree, File} = lsp_syntax:module_syntax_tree(Module),
  -    case find_module(SyntaxTree, Module) of
  -        {attribute, {Line, Column}, _} -> {File, Line, Column};
  -        _ -> undefined
  +    case lsp_syntax:module_syntax_tree(Module) of
  +        undefined -> undefined;
  +        {SyntaxTree, File} ->
  +            case find_module(SyntaxTree, Module) of
  +                {attribute, {Line, Column}, _} -> {File, Line, Column};
  +                _ -> undefined
  +            end
       end;
   find_element({hrl, HrlFile}, _CurrentFileSyntaxTree, _CurrentFile) ->
       {HrlFile, 1, 1};
   find_element({function_use, Module, Function, Arity}, _CurrentFileSyntaxTree, _CurrentFile) ->
  -    {SyntaxTree, File} = lsp_syntax:module_syntax_tree(Module),
  -    case find_function(SyntaxTree, Function, Arity) of
  -        {function, {Line, Column}, _Function, _Arity, _Clauses} -> {File, Line, Column};
  -        _ -> undefined
  +    case lsp_syntax:module_syntax_tree(Module) of
  +        undefined -> undefined;
  +        {SyntaxTree, File} ->
  +            case find_function(SyntaxTree, Function, Arity) of
  +                {function, {Line, Column}, _Function, _Arity, _Clauses} -> {File, Line, Column};
  +                _ -> undefined
  +            end
       end;
   find_element({record, Record}, CurrentFileSyntaxTree, _CurrentFile) ->
       case find_record(CurrentFileSyntaxTree, Record) of
  
positive.code:             Size2 = Size - 18,
              BaseName = list_to_binary(filename:basename(HrlFile)),
              case LineContents of
                  <<"-include(\"", BaseName:Size1/binary, "\").\r">> when Column > 10, Column =< 10 + Size1 ->
                      {hrl, HrlFile};
                  <<"-include_lib(\"", LongName:Size2/binary, "\").\r">> when Column > 14, Column =< 14 + Size2 ->
                      case filename:split(binary_to_list(LongName)) of
                          [LibName|Remain] ->
                              case code:lib_dir(LibName) of
  
negative.code:         _ ->
              undefined
      end.
  
  find_definition_in_args([{atom, {ModLine, StartMod}, Module}, {atom, {ColumnLine, StartColumn}, Function}, ArityTuple | _] = [_ | Tail], Column, Line) ->
      EndMod = StartMod + length(atom_to_list(Module)),
      EndColumn = StartColumn + length(atom_to_list(Function)),
      case Line of
          ModLine when StartMod =< Column, Column =< EndMod ->
              case parse_arity_tuple(ArityTuple, 0) of
                  false -> find_definition_in_args(Tail, Column, Line);
                  _Arity -> {module_use, Module}
              end;
          ColumnLine when StartColumn =< Column, Column =< EndColumn ->
              case parse_arity_tuple(ArityTuple, 0) of
                  false -> find_definition_in_args(Tail, Column, Line);
                  Arity -> {function_use, Module, Function, Arity}
              end;
          _ -> find_definition_in_args(Tail, Column, Line)
      end;
  find_definition_in_args([_ | Tail], Column, Line) when length(Tail) > 2 ->
      find_definition_in_args(Tail, Column, Line);
  find_definition_in_args([{atom, {ModLine, StartMod}, Module}, {atom, {ColumnLine, StartColumn}, Function}], Column, Line)  ->
      EndMod = StartMod + length(atom_to_list(Module)),
      EndColumn = StartColumn + length(atom_to_list(Function)),
      case Line of
          ModLine when StartMod =< Column, Column =< EndMod ->
              {module_use, Module};
          ColumnLine when StartColumn =< Column, Column =< EndColumn ->
              {function_use, Module, Function, 1}
      end;
  find_definition_in_args(_, _Column, _Line) -> undefined.
  
  parse_arity_tuple({cons, _, _, ArityTuple}, Num) ->
      parse_arity_tuple(ArityTuple, Num + 1);
  parse_arity_tuple({nil, _}, Num) -> Num;
  parse_arity_tuple(_, _) -> false.
  
  find_function_in_export(_CurrentModule, undefined, _Column) ->
      undefined;
  