diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2020-08-08 15:36:10 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2020-08-08 15:36:46 +0100 |
commit | 5cf2cf864636d515cd9c2a9ba5f946662fd8f8e2 (patch) | |
tree | 3a0158ef1ed788b93d3607c547a62aefb4255fc8 /scene/resources | |
parent | 69c81309cc786cc5702fb8d558636fb31f207971 (diff) |
Fix colour region continuation over blank lines, issue 41120
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/syntax_highlighter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/resources/syntax_highlighter.cpp b/scene/resources/syntax_highlighter.cpp index 9c8f9334a9..4479b822c0 100644 --- a/scene/resources/syntax_highlighter.cpp +++ b/scene/resources/syntax_highlighter.cpp @@ -158,6 +158,10 @@ Dictionary CodeHighlighter::_get_line_syntax_highlighting(int p_line) { const String &str = text_edit->get_line(p_line); const int line_length = str.length(); Color prev_color; + + if (in_region != -1 && str.length() == 0) { + color_region_cache[p_line] = in_region; + } for (int j = 0; j < line_length; j++) { Dictionary highlighter_info; |