Skip to content

Commit

Permalink
Merge pull request #87880 from kitbdev/fix-textedit-freeze
Browse files Browse the repository at this point in the history
Fix freeze in TextEdit with `scroll_past_end_of_file` and `fit_content_height`
  • Loading branch information
akien-mga committed Feb 5, 2024
2 parents 45e9d20 + 8ddd27c commit c23cc08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c23cc08

Please sign in to comment.