summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-05-20 22:00:39 +0200
committerGitHub <noreply@github.com>2019-05-20 22:00:39 +0200
commitfdea3d48b041cff23013e7a424e57c814ddd4dbd (patch)
tree24ee3e3e0123d0424a275890263e832bba2beb75 /editor
parentd400a7bdddf9b0b755ecc8bda3d79f4c709093d5 (diff)
parent3bc0445e05e633c8336851363d3a09f02771b79c (diff)
Merge pull request #26809 from KoBeWi/undo_set_text_like_a_boss
Allow to undo TextEdit.set_text
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/script_text_editor.cpp1
-rw-r--r--editor/plugins/text_editor.cpp1
2 files changed, 0 insertions, 2 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index eaba48fa05..315898e9ed 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -376,7 +376,6 @@ void ScriptTextEditor::reload_text() {
int v = te->get_v_scroll();
te->set_text(script->get_source_code());
- te->clear_undo_history();
te->cursor_set_line(row);
te->cursor_set_column(column);
te->set_h_scroll(h);
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index becaae3567..c5036b3c5e 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -202,7 +202,6 @@ void TextEditor::reload_text() {
int v = te->get_v_scroll();
te->set_text(text_file->get_text());
- te->clear_undo_history();
te->cursor_set_line(row);
te->cursor_set_column(column);
te->set_h_scroll(h);