summaryrefslogtreecommitdiff
path: root/editor/plugins/shader_editor_plugin.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2020-02-15 02:59:59 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2020-02-15 03:02:40 +0100
commit3e4b508c3b91ef7cc8769e1be178ef7a75b1ad58 (patch)
tree360e825485c50710847205d8e8a4f8665d954704 /editor/plugins/shader_editor_plugin.cpp
parent7724b842f61e570fcfb1254b12df8c9dc30375c6 (diff)
Add a soft line length guideline to the script editor
The default value is 80. The hard line length guideline's default column has been moved to 100 to account for the new soft line length guideline. It can be disabled by setting its value to the same column as the hard line length guideline. This closes https://github.com/godotengine/godot-proposals/issues/347.
Diffstat (limited to 'editor/plugins/shader_editor_plugin.cpp')
-rw-r--r--editor/plugins/shader_editor_plugin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index a19f0b4975..0210bfff70 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -382,8 +382,9 @@ void ShaderEditor::_editor_settings_changed() {
shader_editor->get_text_edit()->set_v_scroll_speed(EditorSettings::get_singleton()->get("text_editor/navigation/v_scroll_speed"));
shader_editor->get_text_edit()->set_draw_minimap(EditorSettings::get_singleton()->get("text_editor/navigation/show_minimap"));
shader_editor->get_text_edit()->set_minimap_width((int)EditorSettings::get_singleton()->get("text_editor/navigation/minimap_width") * EDSCALE);
- shader_editor->get_text_edit()->set_show_line_length_guideline(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guideline"));
- shader_editor->get_text_edit()->set_line_length_guideline_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_column"));
+ shader_editor->get_text_edit()->set_show_line_length_guidelines(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guidelines"));
+ shader_editor->get_text_edit()->set_line_length_guideline_soft_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_soft_column"));
+ shader_editor->get_text_edit()->set_line_length_guideline_hard_column(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_hard_column"));
shader_editor->get_text_edit()->set_breakpoint_gutter_enabled(false);
}