LSP: Fix crash in find_usages_in_file by correctly resolving annotation names

This commit is contained in:
HolonProduction
2026-04-26 19:02:11 +02:00
parent 6d6e822c68
commit 0813b357d2
7 changed files with 126 additions and 54 deletions
+1 -1
View File
@@ -4631,7 +4631,7 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
}
} break;
case GDScriptParser::COMPLETION_ANNOTATION: {
const String annotation_symbol = "@" + p_symbol;
const String annotation_symbol = "@" + p_symbol.trim_prefix("@");
if (parser.annotation_exists(annotation_symbol)) {
r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS_ANNOTATION;
r_result.class_name = "@GDScript";