Browse Source

Merge pull request #85363 from bruvzg/rtl_fx_nl

[RTL] Fix CharFX character offset calculation.
Rémi Verschelde 1 year ago
parent
commit
8580874d0f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      scene/gui/rich_text_label.cpp

+ 2 - 0
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();
 		current_char_ofs += t->text.length();
 	} else if (p_item->type == ITEM_IMAGE) {
 	} else if (p_item->type == ITEM_IMAGE) {
 		current_char_ofs++;
 		current_char_ofs++;
+	} else if (p_item->type == ITEM_NEWLINE) {
+		current_char_ofs++;
 	}
 	}
 
 
 	if (p_enter) {
 	if (p_enter) {