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:
parent
15ac442247
commit
412e87349a
3 changed files with 27 additions and 23 deletions
|
|
@ -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.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue