diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-22 22:23:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-22 22:23:43 +0200 |
commit | 89bcfa4b364e1edc8e175f766b50d145864eb159 (patch) | |
tree | a0f1c1e32a65d48fa16b146489a36624f909d423 | |
parent | ccf294b92f02af6e60206e220dcf4a8474f73f0a (diff) | |
parent | a5c1830a433209c86063fb4319a699b76898c3e7 (diff) |
Merge pull request #31580 from Paulb23/issue_31565_out_of_size
Fix minimap mouse click resolving to -1
-rw-r--r-- | scene/gui/text_edit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 819fcc974d..f8c31121be 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -2083,7 +2083,7 @@ void TextEdit::_get_minimap_mouse_row(const Point2i &p_mouse, int &r_row) const int num_lines_before = round((viewport_offset_y) / minimap_line_height); int wi; int minimap_line = (v_scroll->get_max() <= minimap_visible_lines) ? -1 : first_visible_line; - if (first_visible_line >= 0 && minimap_line >= 0) { + if (first_visible_line > 0 && minimap_line >= 0) { minimap_line -= num_lines_from_rows(first_visible_line, 0, -num_lines_before, wi); minimap_line -= (smooth_scroll_enabled ? 1 : 0); } else { |