summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Mintram <james@rattlecan.games>2022-12-31 21:45:18 +0000
committerRĂ©mi Verschelde <rverschelde@gmail.com>2023-02-16 22:03:01 +0100
commitaa024296d162c156bf07ddd23341789c2ee371eb (patch)
tree775b7ded08990e9d54c4c43e6e9ebe2783d9ccdb
parent15a97a2e8462ff76fe2eb44094f61320065b7dc8 (diff)
Fix error spam when hovering minimap in the script editor
-rw-r--r--scene/gui/text_edit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index d785280701..2b3b577697 100644
--- a/scene/gui/text_edit.cpp
+++ b/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;
}