diff options
| -rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index e01cf72149..956e7a98a2 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -1138,8 +1138,8 @@ void ScriptEditor::_menu_option(int p_option) {  				int line = tx->cursor_get_line();  				int next_line = line + 1; -				if (line == tx->get_line_count() || next_line > tx->get_line_count()) -					return; +				if (line == tx->get_line_count() - 1 || next_line >= tx->get_line_count()) +					tx->set_line(line, tx->get_line(line) + "\n");  				String line_clone = tx->get_line(line);  				tx->insert_at(line_clone, next_line); @@ -1835,6 +1835,7 @@ void ScriptEditor::edit(const Ref<Script>& p_script) {  	ScriptTextEditor *ste = memnew( ScriptTextEditor );  	ste->set_edited_script(p_script);  	ste->get_text_edit()->set_tooltip_request_func(this,"_get_debug_tooltip",ste); +	ste->get_text_edit()->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/auto_brace_complete"));  	tab_container->add_child(ste);  	_go_to_tab(tab_container->get_tab_count()-1);  |