diff options
| author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-11-26 00:06:32 +0200 |
|---|---|---|
| committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-11-26 00:07:46 +0200 |
| commit | 7a59efac323d55a18596d196aff4c9c33d5ee03b (patch) | |
| tree | 51800ab5dc38416941aa76a21695b8be51cd3fd2 /scene | |
| parent | 1ba920fada9efc8c4476ded50fe673b8db541366 (diff) | |
| download | redot-engine-7a59efac323d55a18596d196aff4c9c33d5ee03b.tar.gz | |
[RTL] Fix CharFX character offset calculation.
Diffstat (limited to 'scene')
| -rw-r--r-- | scene/gui/rich_text_label.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index dc96f8a594..0da8a79654 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -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) { |
