[LyX/2.3.x] Take right margin into account for text inset width
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Thu Dec 17 09:53:10 UTC 2020
commit 20c89597909ddf9bfc94d0972ce45b423a5c06bb
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.
(cherry picked from commit 875b1def4fde82ff06089bd84fc9b3157878c011)
---
src/TextMetrics.cpp | 2 +-
status.23x | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index 91a173a..3769627 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -490,7 +490,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
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);
diff --git a/status.23x b/status.23x
index 4f282fa..fd6995e 100644
--- a/status.23x
+++ b/status.23x
@@ -64,6 +64,8 @@ What's new
- Fix width of collapsible insets with sublabels (bug 12046).
+- Fix Hebrew characters overflow in insets (bug 12030).
+
* INTERNALS
More information about the lyx-cvs
mailing list