summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Sobrinho <franklin_gs@hotmail.com>2016-01-10 12:20:04 -0300
committerFranklin Sobrinho <franklin_gs@hotmail.com>2016-01-10 12:20:04 -0300
commit56bc005643dbdd5ec47c93626bb5ee7baa077667 (patch)
treecc0c9a2f6f53f864e1d32ba4b301cd084ca50016
parent3a3ce982b0157c21b4976a347d4c1c254093970f (diff)
Fix script highlighting for classes that begin with "_"
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp6
1 files changed, 5 insertions, 1 deletions
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<StringName>::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