diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-01-11 08:52:12 +0100 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-01-11 08:52:12 +0100 |
commit | 373af4f6206d1c08aca9491da0c91c4c1fab7472 (patch) | |
tree | a88df8d0f80f21d2d6d40e5de49a6e206585c7bc | |
parent | 4c090313bc0d4e5244a9387851658cd582e36ef0 (diff) | |
parent | 56bc005643dbdd5ec47c93626bb5ee7baa077667 (diff) |
Merge pull request #3303 from TheHX/pr-script-editor
Fix script highlighting for classes that begin with "_"
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 6 |
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 |