LSP: Fix crash in find_usages_in_file by correctly resolving annotation names
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user