From bb6cfc130b4e2d64508c9cf5883ad3c3e9f83d9f Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Wed, 30 Mar 2016 19:32:45 +0100 Subject: [PATCH] Option to toggle syntax highlighting (cherry picked from commit d78e98e2a49bf952dd3e38e4a8359903d03bf42c) --- tools/editor/editor_settings.cpp | 2 ++ tools/editor/plugins/script_editor_plugin.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index 106193ac78a4e..e498c0c376c94 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -485,6 +485,8 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { set("text_editor/current_line_color",Color(0.3,0.5,0.8,0.15)); set("text_editor/word_highlighted_color",Color(0.8,0.9,0.9,0.15)); + set("text_editor/syntax_highlighting", true); + set("text_editor/highlight_all_occurrences", true); set("text_editor/scroll_past_end_of_file", false); diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index d74ce7ca37a6b..fa1a9dfa7a4da 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -298,7 +298,6 @@ void ScriptTextEditor::_load_theme_settings() { Color keyword_color= EDITOR_DEF("text_editor/keyword_color",Color(0.5,0.0,0.2)); - get_text_edit()->set_syntax_coloring(true); List keywords; script->get_language()->get_reserved_words(&keywords); for(List::Element *E=keywords.front();E;E=E->next()) { @@ -1923,6 +1922,7 @@ void ScriptEditor::edit(const Ref