Merge pull request #53145 from bruvzg/fix_trim_width_reset

Fix trim overrun width not being reset.
This commit is contained in:
Rémi Verschelde 2021-09-27 23:46:19 +02:00 committed by GitHub
commit 5503059f3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -3573,6 +3573,7 @@ void TextServerAdvanced::shaped_text_overrun_trim_to_width(RID p_shaped_line, re
shaped_text_shape(p_shaped_line);
}
sd->text_trimmed = false;
sd->overrun_trim_data.ellipsis_glyph_buf.clear();
bool add_ellipsis = (p_trim_flags & OVERRUN_ADD_ELLIPSIS) == OVERRUN_ADD_ELLIPSIS;

View file

@ -2683,6 +2683,7 @@ void TextServerFallback::shaped_text_overrun_trim_to_width(RID p_shaped_line, re
shaped_text_shape(p_shaped_line);
}
sd->text_trimmed = false;
sd->overrun_trim_data.ellipsis_glyph_buf.clear();
bool add_ellipsis = (p_trim_flags & OVERRUN_ADD_ELLIPSIS) == OVERRUN_ADD_ELLIPSIS;