[RTL] Fix CharFX character offset calculation.

(cherry picked from commit 7a59efac32)
This commit is contained in:
bruvzg 2023-11-26 00:06:32 +02:00 committed by Rémi Verschelde
parent cc9bb3bc3f
commit 3ba731f9e1
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -3121,6 +3121,8 @@ void RichTextLabel::_add_item(Item *p_item, bool p_enter, bool p_ensure_newline)
current_char_ofs += t->text.length();
} else if (p_item->type == ITEM_IMAGE) {
current_char_ofs++;
} else if (p_item->type == ITEM_NEWLINE) {
current_char_ofs++;
}
if (p_enter) {