From f48f6cea06369b4ddc534f54b3f60732b8eb70e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 30 Aug 2017 15:43:30 +0200 Subject: [PATCH] Revert "Fixed not being able to scroll to eof" This reverts commit 802fab11e4d63851ed36fc4e2a54a000c3c4ee18, it was not relevant for the 2.1 branch. Fixes #10738. --- scene/gui/text_edit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 7cbe1f280e7..f826a746a21 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -458,7 +458,7 @@ void TextEdit::_notification(int p_what) { int ascent = cache.font->get_ascent(); - int visible_rows = get_visible_rows() + 1; + int visible_rows = get_visible_rows(); int tab_w = cache.font->get_char_size(' ').width * tab_size; @@ -2904,7 +2904,7 @@ void TextEdit::adjust_viewport_to_cursor() { visible_rows -= ((h_scroll->get_combined_minimum_size().height - 1) / get_row_height()); if (cursor.line >= (cursor.line_ofs + visible_rows)) - cursor.line_ofs = cursor.line - visible_rows; + cursor.line_ofs = cursor.line - visible_rows + 1; if (cursor.line < cursor.line_ofs) cursor.line_ofs = cursor.line;