Skip to content

Commit

Permalink
Fix shader highlighting the interruption in color_region caused by di…
Browse files Browse the repository at this point in the history
…sabled_branch_regions.
  • Loading branch information
magian1127 committed May 3, 2024
1 parent 10e1114 commit c538b30
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 @@ -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;

Expand Down

0 comments on commit c538b30

Please sign in to comment.