Merge pull request #74777 from lawnjelly/textedit_lineinregion

[3.x] Fix TextEdit color_region_cache bug
This commit is contained in:
Rémi Verschelde 2023-03-12 16:12:36 +01:00 committed by GitHub
commit 16df3416fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5488,7 +5488,7 @@ int TextEdit::_is_line_in_region(int p_line) {
// If not find the closest line we have.
int previous_line = p_line - 1;
for (; previous_line > -1; previous_line--) {
if (color_region_cache.has(p_line)) {
if (color_region_cache.has(previous_line)) {
break;
}
}