diff options
| author | Magian <zang_magian@163.com> | 2024-05-03 12:49:39 +0800 |
|---|---|---|
| committer | Magian <zang_magian@163.com> | 2024-05-03 12:49:39 +0800 |
| commit | c538b3002100a89af7858bd7d1eee9dd36ad96a3 (patch) | |
| tree | 2294d6d73f768f2f9e20546b542331f0c760fa65 | |
| parent | 10e111477db68fe65776a1d68fb1ffccaf6520fc (diff) | |
| download | redot-engine-c538b3002100a89af7858bd7d1eee9dd36ad96a3.tar.gz | |
Fix shader highlighting the interruption in color_region caused by disabled_branch_regions.
| -rw-r--r-- | editor/plugins/text_shader_editor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp index 98d83b6e95..e3d1056824 100644 --- a/editor/plugins/text_shader_editor.cpp +++ b/editor/plugins/text_shader_editor.cpp @@ -48,6 +48,11 @@ Dictionary GDShaderSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_l for (const Point2i ®ion : disabled_branch_regions) { if (p_line >= region.x && p_line <= region.y) { + // When "color_regions[0].p_start_key.length() > 2", + // disabled_branch_region causes color_region to break. + // This should be seen as a temporary solution. + CodeHighlighter::_get_line_syntax_highlighting_impl(p_line); + Dictionary highlighter_info; highlighter_info["color"] = disabled_branch_color; |
