Merge pull request #92271 from kitbdev/fix-max-line-size

Fix TextEdit HScroll hiding after wrapping
This commit is contained in:
Rémi Verschelde 2024-06-07 23:29:28 +02:00
commit 1ee953030e
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 0 deletions

View File

@ -286,6 +286,7 @@ void TextEdit::Text::invalidate_all_lines() {
} }
tab_size_dirty = false; tab_size_dirty = false;
max_width = -1;
_calculate_max_line_width(); _calculate_max_line_width();
} }
@ -404,10 +405,12 @@ void TextEdit::Text::remove_range(int p_from_line, int p_to_line) {
text.resize(text.size() - diff); text.resize(text.size() - diff);
if (dirty_height) { if (dirty_height) {
line_height = -1;
_calculate_line_height(); _calculate_line_height();
} }
if (dirty_width) { if (dirty_width) {
max_width = -1;
_calculate_max_line_width(); _calculate_max_line_width();
} }
} }