瀏覽代碼

Fix freeze in TextEdit with scroll_past_end_of_file and fit_content_height

kit 1 年之前
父節點
當前提交
8ddd27ce1e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
scene/gui/text_edit.cpp

@@ -7333,7 +7333,7 @@ void TextEdit::_update_scrollbars() {
 
 
 	int visible_rows = get_visible_line_count();
 	int visible_rows = get_visible_line_count();
 	int total_rows = draw_placeholder ? placeholder_wraped_rows.size() - 1 : get_total_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;
 		total_rows += visible_rows - 1;
 	}
 	}