From 0bd94372376d5210af47cdc0a2b3278e39da2011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Sun, 17 Aug 2025 18:45:25 +0300 Subject: [PATCH] [RTL] Fix text around `visible_characters` boundary being added twice to the buffer. --- scene/gui/rich_text_label.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 14e9a7f81cf..41d1cded4dc 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -593,10 +593,11 @@ float RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref String second = tx.substr(remaining_characters, -1); l.text_buf->add_string(first, font, font_size, lang, it->rid); l.text_buf->add_string(second, font, font_size, lang, it->rid); + } else { + l.text_buf->add_string(tx, font, font_size, lang, it->rid); } remaining_characters -= tx.length(); - l.text_buf->add_string(tx, font, font_size, lang, it->rid); txt += tx; l.char_count += tx.length(); } break;