diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2025-05-22 20:59:53 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2025-05-22 20:59:53 +0200 |
| commit | f9980e385ffb2ae0b2cefd6dda239d547ef1fb05 (patch) | |
| tree | 0d6b9f5ca66b6b8c2f6bb885fd0eccd60f501213 /src | |
| parent | 07ea39ecdcf02dba84c82d90b028055463f6562c (diff) | |
Fix issue with setting the ast_context.call in hover and file resolve
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/file_resolve.odin | 3 | ||||
| -rw-r--r-- | src/server/hover.odin | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/server/file_resolve.odin b/src/server/file_resolve.odin index c8ca4e7..dd2eabb 100644 --- a/src/server/file_resolve.odin +++ b/src/server/file_resolve.odin @@ -332,11 +332,12 @@ resolve_node :: proc(node: ^ast.Node, data: ^FileResolveData) { defer { data.position_context.call = old_call - data.ast_context.call = old_call } resolve_node(n.expr, data) + data.ast_context.call = old_call + for arg in n.args { data.position_context.position = arg.pos.offset resolve_node(arg, data) diff --git a/src/server/hover.odin b/src/server/hover.odin index 2edc331..9e4e20c 100644 --- a/src/server/hover.odin +++ b/src/server/hover.odin @@ -250,7 +250,9 @@ get_hover_information :: proc(document: ^Document, position: common.Position) -> if position_context.call != nil { if call, ok := position_context.call.derived.(^ast.Call_Expr); ok { - ast_context.call = call + if !position_in_exprs(call.args, position_context.position) { + ast_context.call = call + } } } |