From 7c3b3e0a80141a8ee559201a6f465edd0af3aabe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 7 Jun 2017 07:40:06 +0200 Subject: [PATCH] Revert "Fix text warp in color blocks with CJK" This reverts commit b93fce1c18a58e752c07a634ed11aa8ec199601d. That commit introduced regressions for non-CJK languages are discussed in #8952. Fixes #9078. --- scene/gui/rich_text_label.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 8b551ab0bf4..85ab3ffda7c 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -264,7 +264,7 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int cw = tab_size * font->get_char_size(' ').width; } - if (end > 0 && w + cw + wofs > p_width) { + if (end > 0 && w + cw + begin > p_width) { break; //don't allow lines longer than assigned width }