1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

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

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) { 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 -= 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); minimap_line -= (minimap_line > 0 && smooth_scroll_enabled ? 1 : 0);
} else { }
if (minimap_line < 0) {
minimap_line = 0; minimap_line = 0;
} }