From 56bc005643dbdd5ec47c93626bb5ee7baa077667 Mon Sep 17 00:00:00 2001 From: Franklin Sobrinho Date: Sun, 10 Jan 2016 12:20:04 -0300 Subject: Fix script highlighting for classes that begin with "_" --- tools/editor/plugins/script_editor_plugin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 6c36c71e93..fc0d68b2f8 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -327,7 +327,11 @@ void ScriptTextEditor::_load_theme_settings() { for(List::Element *E=types.front();E;E=E->next()) { - get_text_edit()->add_keyword_color(E->get(),type_color); + String n = E->get(); + if (n.begins_with("_")) + n = n.substr(1, n.length()); + + get_text_edit()->add_keyword_color(n,type_color); } //colorize comments -- cgit v1.2.3