]> git.lyx.org Git - lyx.git/commitdiff
Show change bar for an end-of-paragraph change
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 11 Dec 2023 16:40:09 +0000 (17:40 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 11 Dec 2023 16:57:44 +0000 (17:57 +0100)
Fixes bug #13003.

src/Row.cpp
src/TextMetrics.cpp

index 687d9ec88415277630589d3ada325195196a49c7..20a05c3bae832003f7a03870f68464a5e7e11238 100644 (file)
@@ -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())
index ba05519c677081cd0e818f7a1ac7915e15b847e6..32768970bb66a2acd5275bc8dabc37257ebc6e41 100644 (file)
@@ -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;