From: Jean-Marc Lasgouttes Date: Tue, 17 Nov 2020 16:47:22 +0000 (+0100) Subject: Take right margin into account for text inset width X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=875b1def4fde82ff06089bd84fc9b3157878c011;p=features.git 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. --- 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);