From 397fa2fa7a8ce363d8b9208dcbe4499213f76e26 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 31 Oct 2022 17:34:07 +0200 Subject: [TextServer] Fix incorrect line breaks count for embedded objects (e.g. RTL tables). --- modules/text_server_adv/text_server_adv.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/text_server_adv') diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index 9e5fac3d41..f310f46af9 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -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++; } } -- cgit v1.2.3