diff options
| author | Eric McCarthy | 2018-04-19 19:30:52 -0400 |
|---|---|---|
| committer | Eric McCarthy | 2018-04-19 20:35:42 -0400 |
| commit | 02b7b916b7efb6685f9f8ea31dcae1407d467462 (patch) | |
| tree | 52ee48f066ba94c5e06d65d8b5de10a7e1da971b /editor/plugins/script_text_editor.cpp | |
| parent | df79cc86a56c2d18b421ceacda3dee6669e6cbd9 (diff) | |
| download | godot-02b7b916b7efb6685f9f8ea31dcae1407d467462.tar.gz godot-02b7b916b7efb6685f9f8ea31dcae1407d467462.tar.zst godot-02b7b916b7efb6685f9f8ea31dcae1407d467462.zip | |
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
| -rw-r--r-- | editor/plugins/script_text_editor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index bcc575a7a..61bc58cee 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1007,6 +1007,10 @@ void ScriptTextEditor::_edit_option(int p_op) { } int next_line = to_line + 1; + if (to_line >= tx->get_line_count() - 1) { + tx->set_line(to_line, tx->get_line(to_line) + "\n"); + } + tx->begin_complex_operation(); for (int i = from_line; i <= to_line; i++) { |
