fix bug 2155: crash when undoing dEPM

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10707 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2006-01-04 14:24:40 +00:00
parent a95bd65e3e
commit 86d8a57443
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-01-04 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* text2.C (deleteEmptyParagraphMechanism): since we delete a
paragraph, recordUndo should span two paragraphs (bug 2155).
2006-01-01 Martin Vermeer <martin.vermeer@hut.fi>
* rowpainter.C (paintPar): always repaint the row with the

View File

@ -1234,7 +1234,8 @@ bool LyXText::deleteEmptyParagraphMechanism(LCursor & cur, LCursor & old)
if (oldpar.empty() || (oldpar.size() == 1 && oldpar.isLineSeparator(0))) {
// Delete old par.
recordUndo(old, Undo::ATOMIC, old.pit());
recordUndo(old, Undo::ATOMIC,
old.pit(), min(old.pit() + 1, old.lastpit()));
ParagraphList & plist = old.text()->paragraphs();
plist.erase(plist.begin() + old.pit());