commit 3c81f1ffcf74cb8ab88202ec86623eabdd15a02c
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Thu Sep 17 11:59:40 2026 +0200

    Avoid phantom row when row breaking was not possible
    
    In moveElement, return early when nothing has to be done. This avoid
    the addition of an AlwaysBreakAfter flag to the last element.
    
    The test example here was a Pause layout (which has a long
    LabelString) in beamer class, where the paragraph is empty but the row
    contains a pilcrow to mark paragraph end.
---
 src/Row.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/Row.cpp b/src/Row.cpp
index a8b1f0e612..20864fe4d8 100644
--- a/src/Row.cpp
+++ b/src/Row.cpp
@@ -628,6 +628,8 @@ namespace {
 void moveElements(Row::Elements & from, Row::Elements::iterator const & it,
                   Row::Elements & to)
 {
+       if (it == from.end())
+               return;
        to.insert(to.end(), it, from.end());
        from.erase(it, from.end());
        if (!from.empty())
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to