summaryrefslogtreecommitdiffstats
path: root/editor/plugins/script_text_editor.cpp
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2023-05-01 21:41:50 +0100
committerPaulb23 <p_batty@hotmail.co.uk>2023-05-07 13:08:37 +0100
commit0b3fba45c6e8d2e65904804cfd4c9a219ea31d2a (patch)
treede45f1e29863fe7601b21c964cb60d490808bcf9 /editor/plugins/script_text_editor.cpp
parent64eeb04d2cb2e269d9710c38bdbf366ab3656e76 (diff)
downloadredot-engine-0b3fba45c6e8d2e65904804cfd4c9a219ea31d2a.tar.gz
Move convert_indent into CodeEdit
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r--editor/plugins/script_text_editor.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 65b7526722..f1ad728bc0 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -378,12 +378,8 @@ void ScriptTextEditor::insert_final_newline() {
code_editor->insert_final_newline();
}
-void ScriptTextEditor::convert_indent_to_spaces() {
- code_editor->convert_indent_to_spaces();
-}
-
-void ScriptTextEditor::convert_indent_to_tabs() {
- code_editor->convert_indent_to_tabs();
+void ScriptTextEditor::convert_indent() {
+ code_editor->get_text_editor()->convert_indent();
}
void ScriptTextEditor::tag_saved_version() {
@@ -1282,10 +1278,12 @@ void ScriptTextEditor::_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_PICK_COLOR: {
color_panel->popup();