From 89b422b320a352e503c0625820da1073805d74a9 Mon Sep 17 00:00:00 2001 From: Michael Schmitt Date: Thu, 25 Jan 2007 22:51:00 +0000 Subject: [PATCH] * src/text2.C: deleteEmptyParagraphMechanism(): fix a crash in LyXText::acceptOrRejectChanges() caused by too aggressive deletion git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16860 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/text2.C | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/text2.C b/src/text2.C index bc9980e1de..4b905d6f6f 100644 --- a/src/text2.C +++ b/src/text2.C @@ -1264,8 +1264,9 @@ void LyXText::deleteEmptyParagraphMechanism(pit_type first, pit_type last, bool } } - // don't delete anything if this is the ONLY paragraph - if (pars_.size() == 1) + // don't delete anything if this is the only remaining paragraph within the given range + // note: LyXText::acceptOrRejectChanges() sets the cursor to 'first' after calling DEPM + if (first == last) continue; // don't delete empty paragraphs with keepempty set -- 2.39.5