http://bugzilla.lyx.org/show_bug.cgi?id=4352

The problem occurs when the empty appendix is the last paragraph of
the document. In this case, my earlier fix to bug 4212 is actually
wrong (there is no need to preserve the Appendix status).

The patch is for branch and trunk.

Juergen?

JMarc

svndiff src/Text2.cpp

Index: src/Text2.cpp
===================================================================
--- src/Text2.cpp	(révision 21602)
+++ src/Text2.cpp	(copie de travail)
@@ -1189,7 +1189,7 @@ bool Text::deleteEmptyParagraphMechanism
 		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 above

Reply via email to