Merge pull request #13134 from Chaosus/fixinvalidscroll
Fix invalid scroll
This commit is contained in:
commit
fee2f367af
@ -3488,7 +3488,10 @@ void TextEdit::adjust_viewport_to_cursor() {
|
|||||||
cursor.x_ofs = cursor_x;
|
cursor.x_ofs = cursor_x;
|
||||||
|
|
||||||
update_line_scroll_pos();
|
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();
|
update();
|
||||||
/*
|
/*
|
||||||
get_range()->set_max(text.size());
|
get_range()->set_max(text.size());
|
||||||
|
Loading…
Reference in New Issue
Block a user