From 8ddd27ce1ee321f8d307d0593d1045bc23deb6c3 Mon Sep 17 00:00:00 2001 From: kit Date: Fri, 2 Feb 2024 16:45:06 -0500 Subject: [PATCH] Fix freeze in TextEdit with scroll_past_end_of_file and fit_content_height --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 540c9991317..e2925920a2e 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -7333,7 +7333,7 @@ void TextEdit::_update_scrollbars() { int visible_rows = get_visible_line_count(); int total_rows = draw_placeholder ? placeholder_wraped_rows.size() - 1 : get_total_visible_line_count(); - if (scroll_past_end_of_file_enabled) { + if (scroll_past_end_of_file_enabled && !fit_content_height) { total_rows += visible_rows - 1; }