| 351 | } |
| 352 | |
| 353 | void ScriptTextEditor::reload_text() { |
| 354 | ERR_FAIL_COND(script.is_null()); |
| 355 | |
| 356 | CodeEdit *te = code_editor->get_text_editor(); |
| 357 | int column = te->get_caret_column(); |
| 358 | int row = te->get_caret_line(); |
| 359 | int h = te->get_h_scroll(); |
| 360 | int v = te->get_v_scroll(); |
| 361 | |
| 362 | te->set_text(script->get_source_code()); |
| 363 | te->set_caret_line(row); |
| 364 | te->set_caret_column(column); |
| 365 | te->set_h_scroll(h); |
| 366 | te->set_v_scroll(v); |
| 367 | |
| 368 | te->tag_saved_version(); |
| 369 | |
| 370 | code_editor->update_line_and_column(); |
| 371 | if (editor_enabled) { |
| 372 | _validate_script(); |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | void ScriptTextEditor::add_callback(const String &p_function, const PackedStringArray &p_args) { |
| 377 | ScriptLanguage *language = script->get_language(); |
nothing calls this directly
no test coverage detected