Skip to content

Commit

Permalink
Merge pull request #91497 from magian1127/4.0fixShaderHighlighting
Browse files Browse the repository at this point in the history
Fix shader highlighting the interruption in `color_region` caused by `disabled_branch_regions`.
  • Loading branch information
akien-mga committed May 13, 2024
2 parents de19622 + c538b30 commit 194c940
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/plugins/text_shader_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,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;

Expand Down

0 comments on commit 194c940

Please sign in to comment.