diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-23 10:13:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-23 10:13:07 -0400 |
| commit | 62d2ee69ab58cba3c6f60b2376e73040022c4149 (patch) | |
| tree | 9d1458916f795e818ce0de6cac020053f8c32358 | |
| parent | 0115aaa576f0b7d5d62fe3e8491663bbd45a97fa (diff) | |
| parent | 33e565981eec1e5f37370d7bd2279b11c04dcda5 (diff) | |
Merge pull request #1046 from BradLewis/fix/array-like-completion-methods
Correct array like method completions by resolving the selector before the field
| -rw-r--r-- | src/server/completion.odin | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin index 38b5cbe..75bec86 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -2271,14 +2271,14 @@ get_expression_string_from_position_context :: proc(position_context: ^DocumentP } - if position_context.field != nil { - return src[position_context.field.pos.offset:position_context.field.end.offset] - } - if position_context.selector != nil { return src[position_context.selector.pos.offset:position_context.selector.end.offset] } + if position_context.field != nil { + return src[position_context.field.pos.offset:position_context.field.end.offset] + } + return "" } |