summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2021-06-30 18:03:32 +0100
committerPaulb23 <p_batty@hotmail.co.uk>2021-08-01 12:06:33 +0100
commit8f900ac178acf4e9a5dae1e3a8c78f071debd282 (patch)
tree82125161aa39cea1d83bd4ff0c0d549b8440d7f4 /editor
parentd1a1ad127e03053a484fa71e1c36590d7e39ed95 (diff)
Move line length guidelines into CodeEdit
Diffstat (limited to 'editor')
-rw-r--r--editor/code_editor.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 6e1ac3e837..eeb99b3677 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -951,14 +951,20 @@ void CodeTextEditor::update_editor_settings() {
text_editor->set_line_folding_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/code_folding"));
text_editor->set_draw_fold_gutter(EditorSettings::get_singleton()->get("text_editor/appearance/code_folding"));
text_editor->set_wrap_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/word_wrap"));
- text_editor->set_show_line_length_guidelines(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guidelines"));
- text_editor->set_line_length_guideline_soft_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_soft_column"));
- text_editor->set_line_length_guideline_hard_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_hard_column"));
text_editor->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file"));
text_editor->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/cursor/block_caret"));
text_editor->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink"));
text_editor->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink_speed"));
text_editor->set_auto_brace_completion_enabled(EditorSettings::get_singleton()->get("text_editor/completion/auto_brace_complete"));
+
+ if (EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guidelines")) {
+ TypedArray<int> guideline_cols;
+ guideline_cols.append(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_hard_column"));
+ if (EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_soft_column") != guideline_cols[0]) {
+ guideline_cols.append(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_soft_column"));
+ }
+ text_editor->set_line_length_guidelines(guideline_cols);
+ }
}
void CodeTextEditor::set_find_replace_bar(FindReplaceBar *p_bar) {