From 5cf2cf864636d515cd9c2a9ba5f946662fd8f8e2 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sat, 8 Aug 2020 15:36:10 +0100 Subject: Fix colour region continuation over blank lines, issue 41120 --- modules/gdscript/editor/gdscript_highlighter.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/gdscript/editor') diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index aba3e07134..ae1f2893f1 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -82,6 +82,10 @@ Dictionary GDScriptSyntaxHighlighter::_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 < str.length(); j++) { Dictionary highlighter_info; -- cgit v1.2.3