Revert "Fix visible_lines calculation"

This reverts commit ceee405cec.

This caused regressions, see #73736 and #73780.

Fixes #73780.
This commit is contained in:
Rémi Verschelde 2023-02-22 22:44:01 +01:00
parent 999bb91dc6
commit d66f6b3b04
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 4 additions and 1 deletions

View File

@ -209,7 +209,10 @@ bool Label::_shape() {
// Fill after min_size calculation.
int visible_lines = get_visible_line_count();
int visible_lines = lines_rid.size();
if (max_lines_visible >= 0 && visible_lines > max_lines_visible) {
visible_lines = max_lines_visible;
}
if (autowrap_mode != TextServer::AUTOWRAP_OFF) {
bool lines_hidden = visible_lines > 0 && visible_lines < lines_rid.size();
if (lines_hidden) {