diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-02 08:39:20 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-02 08:39:20 -0400 |
| commit | b1757bc75550803df5980d67a222c579cf0844a2 (patch) | |
| tree | ac0bff5ed5061162bbf98f4f96cb8ee48c1aea82 /src | |
| parent | f93d79f81f8e724e5d3553171c64253c1d5aca4e (diff) | |
Fix reference positions for symbols across files
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/references.odin | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/references.odin b/src/server/references.odin index d20298e..e2ed5d5 100644 --- a/src/server/references.odin +++ b/src/server/references.odin @@ -57,6 +57,7 @@ prepare_references :: proc( if position_in_node(name, position_context.position) { symbol = Symbol { range = common.get_token_range(name, ast_context.file.src), + pkg = ast_context.current_package, } found = true resolve_flag = .Field @@ -104,6 +105,7 @@ prepare_references :: proc( if position_in_node(value.field, position_context.position) { symbol = Symbol { range = common.get_token_range(value.field, ast_context.file.src), + pkg = ast_context.current_package, } found = true resolve_flag = .Field @@ -324,7 +326,7 @@ resolve_references :: proc( node_uri := common.create_uri(v.node.pos.file, ast_context.allocator) location := common.Location { - range = common.get_token_range(v.node^, ast_context.file.src), + range = common.get_token_range(v.node^, string(document.text)), uri = strings.clone(node_uri.uri, ast_context.allocator), } append(&locations, location) |