Merge pull request #41124 from Paulb23/colour_region_blank_lines
Fix colour region continuation over blank lines
This commit is contained in:
commit
f2149fe763
|
@ -82,6 +82,10 @@ Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting(int p_line)
|
||||||
const String &str = text_edit->get_line(p_line);
|
const String &str = text_edit->get_line(p_line);
|
||||||
const int line_length = str.length();
|
const int line_length = str.length();
|
||||||
Color prev_color;
|
Color prev_color;
|
||||||
|
|
||||||
|
if (in_region != -1 && str.length() == 0) {
|
||||||
|
color_region_cache[p_line] = in_region;
|
||||||
|
}
|
||||||
for (int j = 0; j < str.length(); j++) {
|
for (int j = 0; j < str.length(); j++) {
|
||||||
Dictionary highlighter_info;
|
Dictionary highlighter_info;
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,10 @@ Dictionary CodeHighlighter::_get_line_syntax_highlighting(int p_line) {
|
||||||
const String &str = text_edit->get_line(p_line);
|
const String &str = text_edit->get_line(p_line);
|
||||||
const int line_length = str.length();
|
const int line_length = str.length();
|
||||||
Color prev_color;
|
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++) {
|
for (int j = 0; j < line_length; j++) {
|
||||||
Dictionary highlighter_info;
|
Dictionary highlighter_info;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue