summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagian <zang_magian@163.com>2024-05-03 12:49:39 +0800
committerMagian <zang_magian@163.com>2024-05-03 12:49:39 +0800
commitc538b3002100a89af7858bd7d1eee9dd36ad96a3 (patch)
tree2294d6d73f768f2f9e20546b542331f0c760fa65
parent10e111477db68fe65776a1d68fb1ffccaf6520fc (diff)
downloadredot-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.cpp5
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 &region : 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;