From 7aad14a4b6d7ef722851a8c4f9fcafa5b48666b3 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 30 Aug 2022 11:56:17 +0300 Subject: [TextServer] Add support for trimming edge spaces on line break. --- scene/gui/rich_text_label.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'scene/gui/rich_text_label.cpp') diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index c9a903153d..c5fe218a15 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -453,6 +453,7 @@ float RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref case TextServer::AUTOWRAP_OFF: break; } + autowrap_flags = autowrap_flags | TextServer::BREAK_TRIM_EDGE_SPACES; // Clear cache. l.text_buf->clear(); -- cgit v1.2.3