summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorMax Hilbrunner <mhilbrunner@users.noreply.github.com>2018-05-07 14:49:23 +0200
committerGitHub <noreply@github.com>2018-05-07 14:49:23 +0200
commitc587cac304fd580342141fe3ed5899377d9759fd (patch)
treea105783ceadc265b2d168f10e4963a72b8fe15f3 /editor/plugins
parent35322c0678edad29927adc7352003f166549a5d3 (diff)
parent02b7b916b7efb6685f9f8ea31dcae1407d467462 (diff)
Merge pull request #18308 from ericmccarthy7/develop
Fix clone down newline bug
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/script_text_editor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index c872a6f28b..0114dfc63b 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++) {