diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-08 15:02:57 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-08 15:02:57 -0400 |
| commit | 7e26c789c615ac051fcd5f3ca12a66717cd92fe8 (patch) | |
| tree | 6288cec2cded0aa2ad7560624b53232332b4d712 /src | |
| parent | 9bdcac7e8724b9c9276bceb4b9f39b65469a693e (diff) | |
Use `strings.equal_fold` when comparing references to fix casing issues on windows
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/references.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/references.odin b/src/server/references.odin index 79de7bb..d3dc98f 100644 --- a/src/server/references.odin +++ b/src/server/references.odin @@ -324,7 +324,7 @@ resolve_references :: proc( if in_pkg || symbol.pkg == document.package_name { symbols_and_nodes := resolve_entire_file(&document, resolve_flag, context.allocator) for k, v in symbols_and_nodes { - if v.symbol.uri == symbol.uri && v.symbol.range == symbol.range { + if strings.equal_fold(v.symbol.uri, symbol.uri) && v.symbol.range == symbol.range { node_uri := common.create_uri(v.node.pos.file, ast_context.allocator) range := common.get_token_range(v.node^, string(document.text)) //We don't have to have the `.` with, otherwise it renames the dot. @@ -347,7 +347,7 @@ resolve_references :: proc( symbols_and_nodes := resolve_entire_file(document, resolve_flag, context.allocator) for k, v in symbols_and_nodes { - if v.symbol.uri == symbol.uri && v.symbol.range == symbol.range { + if strings.equal_fold(v.symbol.uri, symbol.uri) && v.symbol.range == symbol.range { node_uri := common.create_uri(v.node.pos.file, ast_context.allocator) range := common.get_token_range(v.node^, ast_context.file.src) |