2
0
Chaosus 7 жил өмнө
parent
commit
9240b7f2d1

+ 4 - 1
scene/gui/text_edit.cpp

@@ -3467,7 +3467,10 @@ void TextEdit::adjust_viewport_to_cursor() {
 		cursor.x_ofs = cursor_x;
 
 	update_line_scroll_pos();
-	v_scroll->set_value(get_line_scroll_pos() + 1);
+	if (get_line_scroll_pos() == 0)
+		v_scroll->set_value(0);
+	else
+		v_scroll->set_value(get_line_scroll_pos() + 1);
 	update();
 	/*
 	get_range()->set_max(text.size());