From e91bde652165a0be06c7019ed370ff45525a7170 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Thu, 10 Aug 2017 19:23:45 +0100 Subject: Fixed undo when converting indent with no changes, issue 9841 --- editor/plugins/script_text_editor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'editor/plugins') 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); -- cgit v1.2.3