Fix invalid scroll

This commit is contained in:
Chaosus 2017-11-21 12:37:53 +03:00
parent c846e49a7d
commit 9240b7f2d1

View File

@ -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());