1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-30 18:30:54 +00:00

Merge pull request #114401 from HolonProduction/lsp-fixup

LSP: Fix infinite recursion in symbol calculation
This commit is contained in:
Rémi Verschelde
2025-12-29 18:08:27 +01:00
committed by GitHub

View File

@@ -389,12 +389,15 @@ ExtendGDScriptParser *GDScriptLanguageProtocol::LSPeer::parse_script(const Strin
}
ExtendGDScriptParser *parser = memnew(ExtendGDScriptParser);
parse_results[p_path] = parser;
parser->parse(content, p_path);
if (document != nullptr) {
parse_results[p_path] = parser;
GDScriptLanguageProtocol::get_singleton()->get_workspace()->publish_diagnostics(p_path);
} else {
// Don't keep cached for further requests since we can't invalidate the cache properly.
parse_results.erase(p_path);
stale_parsers[p_path] = parser;
}