1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

GDScript: Canonicalize script path in FQCN

This commit is contained in:
Danil Alexeev
2024-02-26 10:46:24 +03:00
parent 81f3d43cc1
commit 8ffc50ee8c
5 changed files with 15 additions and 17 deletions

View File

@@ -641,7 +641,7 @@ void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<S
while (!stack.is_empty()) {
current = Object::cast_to<Node>(stack.pop_back());
Ref<GDScript> scr = current->get_script();
if (scr.is_valid() && GDScript::is_equal_gdscript_paths(scr->get_path(), path)) {
if (scr.is_valid() && GDScript::is_canonically_equal_paths(scr->get_path(), path)) {
break;
}
for (int i = 0; i < current->get_child_count(); ++i) {
@@ -650,7 +650,7 @@ void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<S
}
Ref<GDScript> scr = current->get_script();
if (!scr.is_valid() || !GDScript::is_equal_gdscript_paths(scr->get_path(), path)) {
if (!scr.is_valid() || !GDScript::is_canonically_equal_paths(scr->get_path(), path)) {
current = owner_scene_node;
}
}