summaryrefslogtreecommitdiff
path: root/modules/text_server_adv
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-10-31 17:34:07 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-10-31 17:34:07 +0200
commit397fa2fa7a8ce363d8b9208dcbe4499213f76e26 (patch)
tree534cdac278b4bb8750dad8cf66e5add9318a5a28 /modules/text_server_adv
parente22a1d80312d3e0756225384810b67d36ffb34c8 (diff)
[TextServer] Fix incorrect line breaks count for embedded objects (e.g. RTL tables).
Diffstat (limited to 'modules/text_server_adv')
-rw-r--r--modules/text_server_adv/text_server_adv.cpp3
1 files changed, 2 insertions, 1 deletions
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++;
}
}