Browse Source

Use Math::round() instead of round() for rounding the scroll position

Bram Buurlage 1 year ago
parent
commit
a18f443846
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
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);
 		set_v_scroll(0);
 		return;
 		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 {
 int TextEdit::get_last_full_visible_line() const {