summaryrefslogtreecommitdiffstats
path: root/editor/plugins/text_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/text_editor.cpp')
-rw-r--r--editor/plugins/text_editor.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 174588b92e..7a76e4f989 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -288,12 +288,8 @@ void TextEditor::insert_final_newline() {
code_editor->insert_final_newline();
}
-void TextEditor::convert_indent_to_spaces() {
- code_editor->convert_indent_to_spaces();
-}
-
-void TextEditor::convert_indent_to_tabs() {
- code_editor->convert_indent_to_tabs();
+void TextEditor::convert_indent() {
+ code_editor->get_text_editor()->convert_indent();
}
void TextEditor::tag_saved_version() {
@@ -419,10 +415,12 @@ void TextEditor::_edit_option(int p_op) {
trim_trailing_whitespace();
} break;
case EDIT_CONVERT_INDENT_TO_SPACES: {
- convert_indent_to_spaces();
+ tx->set_indent_using_spaces(true);
+ convert_indent();
} break;
case EDIT_CONVERT_INDENT_TO_TABS: {
- convert_indent_to_tabs();
+ tx->set_indent_using_spaces(false);
+ convert_indent();
} break;
case EDIT_TO_UPPERCASE: {
_convert_case(CodeTextEditor::UPPER);