瀏覽代碼

[RTL] Fix CharFX character offset calculation.

bruvzg 1 年之前
父節點
當前提交
7a59efac32
共有 1 個文件被更改,包括 2 次插入0 次删除
  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();
 	} else if (p_item->type == ITEM_IMAGE) {
 		current_char_ofs++;
+	} else if (p_item->type == ITEM_NEWLINE) {
+		current_char_ofs++;
 	}
 
 	if (p_enter) {