Merge pull request #13134 from Chaosus/fixinvalidscroll
Fix invalid scroll
This commit is contained in:
commit
fee2f367af
1 changed files with 4 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue