Browse Source

Fix error spam when hovering minimap in the script editor

James Mintram 2 years ago
parent
commit
aa024296d1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      scene/gui/text_edit.cpp

+ 3 - 1
scene/gui/text_edit.cpp

@@ -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;
 	}