From a18f4438464c8d06854e32fdaec7967de7505453 Mon Sep 17 00:00:00 2001 From: Bram Buurlage Date: Sat, 30 Sep 2023 11:00:24 +0200 Subject: [PATCH] Use Math::round() instead of round() for rounding the scroll position --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index ea6c45b85f..46e5d07c06 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -5473,7 +5473,7 @@ void TextEdit::set_line_as_last_visible(int p_line, int p_wrap_index) { set_v_scroll(0); return; } - set_v_scroll(round(get_scroll_pos_for_line(first_line, next_line.y) + _get_visible_lines_offset())); + set_v_scroll(Math::round(get_scroll_pos_for_line(first_line, next_line.y) + _get_visible_lines_offset())); } int TextEdit::get_last_full_visible_line() const {