From 875b1def4fde82ff06089bd84fc9b3157878c011 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 17 Nov 2020 17:47:22 +0100 Subject: [PATCH] Take right margin into account for text inset width This is particularly important for contents in RtL languages, where the right margin may contain the paragraph indentation, or itemize/enumeration symbols. Fixes bug #12030. --- src/TextMetrics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index ddc84cfd44..e937950e24 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -550,7 +550,7 @@ bool TextMetrics::redoParagraph(pit_type const pit, bool const align_rows) first = row.endpos(); ++row_index; - pm.dim().wid = max(pm.dim().wid, row.width()); + pm.dim().wid = max(pm.dim().wid, row.width() + row.right_margin); pm.dim().des += row.height(); } while (first < par.size() || need_new_row); -- 2.39.2