]> git.lyx.org Git - features.git/commitdiff
* src/Text2.cpp (deleteEmptyParagraphMechanism): do not reset the
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 16 Nov 2007 13:33:21 +0000 (13:33 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 16 Nov 2007 13:33:21 +0000 (13:33 +0000)
appendix marker if the deleted paragraph was the last one (bug 4352)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21639 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text2.cpp

index 2a0249a523fdd0d44063613e95b453a90b053310..8abecd92082db52d7b2e19bcb8c2c6389f931d5f 100644 (file)
@@ -820,7 +820,7 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur,
                bool const soa = oldpar.params().startOfAppendix();
                plist.erase(boost::next(plist.begin(), old.pit()));
                // do not lose start of appendix marker (bug 4212)
-               if (soa)
+               if (soa && old.pit() < plist.size())
                        plist[old.pit()].params().startOfAppendix(true);
 
                // see #warning (FIXME?) above