]> git.lyx.org Git - lyx.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>
Thu, 17 Dec 2020 10:23:27 +0000 (11:23 +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.

(cherry picked from commit 875b1def4fde82ff06089bd84fc9b3157878c011)

src/TextMetrics.cpp
status.23x

index 91a173a3a5c146277148aecf22c398a803142f71..3769627f68d32c768c4a89da73ddd7f3caaf5bcd 100644 (file)
@@ -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);
 
index 4f282fa68bf2226d20f149b4403bf6fe09d67c43..fd6995ed259bd2556f2e821bd4316c5e8aa37ae3 100644 (file)
@@ -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