aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/script_text_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r--editor/plugins/script_text_editor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 65be93e77..0eb53d1a6 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -298,10 +298,10 @@ void ScriptTextEditor::convert_indent_to_spaces() {
return;
}
- int tab_size = EditorSettings::get_singleton()->get("text_editor/indent/tab_size");
+ int indent_size = EditorSettings::get_singleton()->get("text_editor/indent/size");
String indent = "";
- for (int i = 0; i < tab_size; i++) {
+ for (int i = 0; i < indent_size; i++) {
indent += " ";
}
@@ -340,8 +340,8 @@ void ScriptTextEditor::convert_indent_to_tabs() {
return;
}
- int tab_size = EditorSettings::get_singleton()->get("text_editor/indent/tab_size");
- tab_size -= 1;
+ int indent_size = EditorSettings::get_singleton()->get("text_editor/indent/size");
+ indent_size -= 1;
bool changed_indentation = false;
for (int i = 0; i < tx->get_line_count(); i++) {
@@ -357,13 +357,13 @@ void ScriptTextEditor::convert_indent_to_tabs() {
if (line[j] != '\t') {
space_count++;
- if (space_count == tab_size) {
+ if (space_count == indent_size) {
if (!changed_indentation) {
tx->begin_complex_operation();
changed_indentation = true;
}
- line = line.left(j - tab_size) + "\t" + line.right(j + 1);
+ line = line.left(j - indent_size) + "\t" + line.right(j + 1);
j = 0;
space_count = -1;
}