diff options
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 1fe4ac1372..1b71f6800a 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -457,6 +457,11 @@ void ScriptTextEditor::trim_trailing_whitespace() { code_editor->trim_trailing_whitespace(); } +void ScriptTextEditor::insert_final_newline() { + + code_editor->insert_final_newline(); +} + void ScriptTextEditor::convert_indent_to_spaces() { code_editor->convert_indent_to_spaces(); @@ -867,6 +872,12 @@ void ScriptTextEditor::_update_connected_methods() { continue; } + // As deleted nodes are still accessible via the undo/redo system, check if they're still on the tree. + Node *source = Object::cast_to<Node>(connection.source); + if (source && !source->is_inside_tree()) { + continue; + } + int line = script->get_language()->find_function(connection.method, text_edit->get_text()); if (line < 0) { missing_connections.push_back(connection); |