Merge pull request #13134 from Chaosus/fixinvalidscroll

Fix invalid scroll
This commit is contained in:
Rémi Verschelde 2017-11-21 14:25:15 +01:00 committed by GitHub
commit fee2f367af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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