diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-10-11 09:09:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-11 09:09:40 +0200 |
commit | 346e8a9a6e56114cd92b8d9fe83ee641c8c5381f (patch) | |
tree | d75995c57616c74ac076d6ad9591589ac4dd473b /tools/editor/code_editor.cpp | |
parent | 3df507d6961fe123a45f2af9e6eec50e136b6a1d (diff) | |
parent | 0159e4f96918990ee7bc3e9616ba073e566ad6e4 (diff) |
Merge pull request #6762 from RandomShaper/improve-text-editor
Line length guideline setting plus some tidy-up
Diffstat (limited to 'tools/editor/code_editor.cpp')
-rw-r--r-- | tools/editor/code_editor.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp index 9240e3527c..17f252ee25 100644 --- a/tools/editor/code_editor.cpp +++ b/tools/editor/code_editor.cpp @@ -1105,6 +1105,23 @@ void CodeTextEditor::_font_resize_timeout() { } } +void CodeTextEditor::update_editor_settings() { + + text_editor->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/auto_brace_complete")); + text_editor->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/scroll_past_end_of_file")); + text_editor->set_tab_size(EditorSettings::get_singleton()->get("text_editor/tab_size")); + text_editor->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/draw_tabs")); + text_editor->set_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/show_line_numbers")); + text_editor->set_show_line_length_guideline(EditorSettings::get_singleton()->get("text_editor/show_line_length_guideline")); + text_editor->set_line_length_guideline_column(EditorSettings::get_singleton()->get("text_editor/line_length_guideline_column")); + text_editor->set_syntax_coloring(EditorSettings::get_singleton()->get("text_editor/syntax_highlighting")); + text_editor->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/highlight_all_occurrences")); + text_editor->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/caret_blink")); + text_editor->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/caret_blink_speed")); + text_editor->set_draw_breakpoint_gutter(EditorSettings::get_singleton()->get("text_editor/show_breakpoint_gutter")); + text_editor->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/block_caret")); +} + void CodeTextEditor::set_error(const String& p_error) { if (p_error!="") { |