diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-11 10:41:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-11 10:41:32 +0200 |
commit | bed66afee4b495e0eaaabdf481c91e75b096f27d (patch) | |
tree | 8e93bbe888ce9d333ce5989b3e95d5071360028b /editor | |
parent | fd6b9d9ac7dfdf895ad9f297480216fcd908d8cf (diff) | |
parent | e91bde652165a0be06c7019ed370ff45525a7170 (diff) |
Merge pull request #10237 from Paulb23/convert_indent_save_issue_9841
Fixed undo when converting indent with no changes, issue 9841
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 62fcc4b489..422c656351 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -355,7 +355,9 @@ void ScriptTextEditor::convert_indent_to_spaces() { } j++; } - tx->set_line(i, line); + if (changed_indentation) { + tx->set_line(i, line); + } } if (changed_indentation) { tx->cursor_set_column(cursor_column); @@ -409,7 +411,9 @@ void ScriptTextEditor::convert_indent_to_tabs() { } j++; } - tx->set_line(i, line); + if (changed_indentation) { + tx->set_line(i, line); + } } if (changed_indentation) { tx->cursor_set_column(cursor_column); |