You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix out of sync when the script is edited externally via lsp
Previously, external editing via lsp would modify the modified time of the script, which caused the internal display of the script to not be refreshed when refocusing the engine. Now saving the script externally via lsp will automatically refresh the internal display.
This commit is contained in:
@@ -422,6 +422,7 @@ void GDScriptTextDocument::sync_script_content(const String &p_path, const Strin
|
||||
if (error == OK) {
|
||||
if (script->load_source_code(path) == OK) {
|
||||
script->reload(true);
|
||||
ScriptEditor::get_singleton()->reload_scripts(true); // Refresh scripts opened in the internal editor.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user