diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-05-07 00:52:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 00:52:50 +0200 |
commit | 8962d36bb1c249d608f2d2855f7b8258b0ed6309 (patch) | |
tree | c3e00d103d7b0fd27c95292bc1752ba2b611f42d /modules/gdscript/editor/gdscript_highlighter.cpp | |
parent | 49b556a9f112be63b1c188dfb7ba055db7118471 (diff) | |
parent | e905e8f145ef5d91aa6f8200bf415569e28d5967 (diff) |
Merge pull request #33577 from Calinou/highlight-control-flow-keywords
Highlight control flow keywords with a different color
Diffstat (limited to 'modules/gdscript/editor/gdscript_highlighter.cpp')
-rw-r--r-- | modules/gdscript/editor/gdscript_highlighter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index ccc942d86b..ca646dff15 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -485,10 +485,15 @@ void GDScriptSyntaxHighlighter::_update_cache() { /* Reserved words. */ const Color keyword_color = EDITOR_GET("text_editor/highlighting/keyword_color"); + const Color control_flow_keyword_color = EDITOR_GET("text_editor/highlighting/control_flow_keyword_color"); List<String> keyword_list; gdscript->get_reserved_words(&keyword_list); for (List<String>::Element *E = keyword_list.front(); E; E = E->next()) { - keywords[E->get()] = keyword_color; + if (gdscript->is_control_flow_keyword(E->get())) { + keywords[E->get()] = control_flow_keyword_color; + } else { + keywords[E->get()] = keyword_color; + } } /* Comments */ |