diff options
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r-- | scene/gui/text_edit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 21842d4d58..1c937a6784 100644 --- a/scene/gui/text_edit.cpp +++ b/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()); |