Merge pull request #68085 from bruvzg/brk_fix

[TextServer] Fix incorrect line breaks count for embedded objects (e.g. RTL tables).
This commit is contained in:
Rémi Verschelde 2022-10-31 23:03:06 +01:00
commit 887a6c79cd
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 1 deletions

View File

@ -4622,7 +4622,8 @@ bool TextServerAdvanced::_shaped_text_update_breaks(const RID &p_shaped) {
sd->breaks[pos] = false;
int pos_p = pos - 1 - sd->start;
if (pos - sd->start != sd->end && !is_whitespace(sd->text[pos_p])) {
char32_t c = sd->text[pos_p];
if (pos - sd->start != sd->end && !is_whitespace(c) && (c != 0xfffc)) {
sd->break_inserts++;
}
}