[LyX/master] Show change bar for an end-of-paragraph change

Jean-Marc Lasgouttes lasgouttes at lyx.org
Mon Dec 11 15:33:45 UTC 2023


commit 8832f816ce54837f410f8ca190841cdf410279f9
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Mon Dec 11 17:40:09 2023 +0100

    Show change bar for an end-of-paragraph change
    
    Fixes bug #13003.
---
 src/Row.cpp         |    1 +
 src/TextMetrics.cpp |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/Row.cpp b/src/Row.cpp
index 687d9ec..20a05c3 100644
--- a/src/Row.cpp
+++ b/src/Row.cpp
@@ -425,6 +425,7 @@ bool Row::sameString(Font const & f, Change const & ch) const
 }
 
 
+// FIXME: remove this and move the changebar update to Row::push_back()
 void Row::finalizeLast()
 {
 	if (elements_.empty())
diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index ba05519..3276897 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -1176,6 +1176,9 @@ RowList TextMetrics::breakParagraph(Row const & bigrow) const
 		// Last row in paragraph is flushed
 		rows.back().flushed(true);
 		cleanupRow(rows.back(), true);
+		// Is there an end-of-paragraph change?
+		if (bigrow.needsChangeBar())
+			rows.back().needsChangeBar(true);
 	}
 
 	return rows;


More information about the lyx-cvs mailing list