Fix error spam when hovering minimap in the script editor

This commit is contained in:
James Mintram 2022-12-31 21:45:18 +00:00 committed by Rémi Verschelde
parent 15a97a2e84
commit aa024296d1
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 1 deletions

View File

@ -4362,7 +4362,9 @@ int TextEdit::get_minimap_line_at_pos(const Point2i &p_pos) const {
if (first_vis_line > 0 && minimap_line >= 0) {
minimap_line -= get_next_visible_line_index_offset_from(first_vis_line, 0, -num_lines_before).x;
minimap_line -= (minimap_line > 0 && smooth_scroll_enabled ? 1 : 0);
} else {
}
if (minimap_line < 0) {
minimap_line = 0;
}