Fix empty line hover; fix open non-res:// script

(cherry picked from commit 572979d011)
This commit is contained in:
Francois Belair 2021-10-01 11:26:26 -04:00 committed by Rémi Verschelde
parent 003c282e10
commit 6be31e559d
No known key found for this signature in database
GPG key ID: C3336907360768E1
3 changed files with 9 additions and 3 deletions

View file

@ -422,6 +422,9 @@ GDScriptTextDocument::~GDScriptTextDocument() {
void GDScriptTextDocument::sync_script_content(const String &p_path, const String &p_content) {
String path = GDScriptLanguageProtocol::get_singleton()->get_workspace()->get_file_path(p_path);
if (!path.begins_with("res://")) {
return;
}
GDScriptLanguageProtocol::get_singleton()->get_workspace()->parse_script(path, p_content);
EditorFileSystem::get_singleton()->update_file(path);