Merge pull request #33084 from Paulb23/33077_minimap_fold_crash

Fix text minimap crash when last line is folded
This commit is contained in:
Rémi Verschelde 2019-10-26 14:54:14 +02:00 committed by GitHub
commit f037eb7b0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -958,6 +958,10 @@ void TextEdit::_notification(int p_what) {
} }
} }
if (minimap_line < 0 || minimap_line >= (int)text.size()) {
break;
}
Map<int, HighlighterInfo> color_map; Map<int, HighlighterInfo> color_map;
if (syntax_coloring) { if (syntax_coloring) {
color_map = _get_line_syntax_highlighting(minimap_line); color_map = _get_line_syntax_highlighting(minimap_line);