[LyX/master] Count the width of pilcrows indicating changed end-of-par

Jean-Marc Lasgouttes lasgouttes at lyx.org
Wed Jul 21 09:13:41 UTC 2021


commit b0a74fa41075a35f26106050140aa637d5b41d1d
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Wed Jul 21 11:24:45 2021 +0200

    Count the width of pilcrows indicating changed end-of-par
    
    This is related to #10357. The case of real end-of-par markers is
    taken into account, but not "change" markers, which have been
    introduced in 2.4.
---
 src/TextMetrics.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index b0d1ff0..57c7715 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -493,8 +493,9 @@ bool TextMetrics::redoParagraph(pit_type const pit, bool const align_rows)
 		// substracted to the available width. The logic here is
 		// almost the same as in breakRow, remember keep them in sync.
 		int eop = 0;
-		if (lyxrc.paragraph_markers && e.pos + 1 == par.size()
-		    && size_type(pit + 1) < text_->paragraphs().size()) {
+		if (e.pos + 1 == par.size()
+		      && (lyxrc.paragraph_markers || par.lookupChange(par.size()).changed())
+		      && size_type(pit + 1) < text_->paragraphs().size()) {
 			Font f(text_->layoutFont(pit));
 			// ¶ U+00B6 PILCROW SIGN
 			eop = theFontMetrics(f).width(char_type(0x00B6));


More information about the lyx-cvs mailing list