[LyX/master] Take right margin into account for text inset width
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Tue Nov 17 16:23:46 UTC 2020
commit 875b1def4fde82ff06089bd84fc9b3157878c011
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Tue Nov 17 17:47:22 2020 +0100
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 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index ddc84cf..e937950 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);
More information about the lyx-cvs
mailing list