]> git.lyx.org Git - features.git/commitdiff
Take right margin into account for text inset width
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 17 Nov 2020 16:47:22 +0000 (17:47 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 17 Nov 2020 16:51:43 +0000 (17:51 +0100)
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

index ddc84cfd442d5157889dd57081eecb403f56be2c..e937950e247520665b9bb5811584d96440ff7104 100644 (file)
@@ -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);