diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2022-05-31 12:36:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-31 12:36:37 +0200 |
| commit | 68bf4eb100a6b49133157b0ecf8c55119b575be8 (patch) | |
| tree | f3e013edc038bbb6433b676cd0da3d21ee262459 /modules/gdscript/editor/gdscript_highlighter.cpp | |
| parent | cf9aad63badbb3cc002071335fdddc9153491d3b (diff) | |
| parent | eba3e0a9fce1f10e8ad7311e84e9f3d38dae008e (diff) | |
| download | redot-engine-68bf4eb100a6b49133157b0ecf8c55119b575be8.tar.gz | |
Merge pull request #61440 from vnen/gdscript-scene-unique-nodes
GDScript: Support `%` in shorthand for `get_node`
Diffstat (limited to 'modules/gdscript/editor/gdscript_highlighter.cpp')
| -rw-r--r-- | modules/gdscript/editor/gdscript_highlighter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index 191568661d..b86e9b386d 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -387,9 +387,9 @@ Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_l in_member_variable = false; } - if (!in_node_path && in_region == -1 && str[j] == '$') { + if (!in_node_path && in_region == -1 && (str[j] == '$' || str[j] == '%')) { in_node_path = true; - } else if (in_region != -1 || (is_a_symbol && str[j] != '/')) { + } else if (in_region != -1 || (is_a_symbol && str[j] != '/' && str[j] != '%')) { in_node_path = false; } |
