From: André Pönitz Date: Wed, 30 Apr 2003 07:04:33 +0000 (+0000) Subject: fix Undo as suggested by Alfredo X-Git-Tag: 1.6.10~16887 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=605912d57599f35065bab27ad3ab4d0b2d3653b4;p=features.git fix Undo as suggested by Alfredo git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6895 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 598c6e62a1..d884f4a6a4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ + +2003-04-30 André Pönitz + + * undo_func.C: revert part of yesterday's patch 2 + 2003-04-30 John Levon * LColor.C: s/tabular/table/ diff --git a/src/undo_funcs.C b/src/undo_funcs.C index 0e7b3a1a61..d0d9571881 100644 --- a/src/undo_funcs.C +++ b/src/undo_funcs.C @@ -321,11 +321,18 @@ bool createUndo(BufferView * bv, Undo::undo_kind kind, } // create a new Undo - Paragraph * undopar = 0; // nothing to replace yet (undo of delete maybe) + Paragraph * undopar = 0; // nothing to replace (undo of delete maybe) Paragraph * start = first; - Paragraph * end = &*boost::prior(itbehind); + Paragraph * end = 0; + if (behind) + end = const_cast(behind->previous()); + else { + end = start; + while (end->next()) + end = end->next(); + } if (start && end && (start != end->next()) && ((before_number != behind_number) || ((before_number < 0) && (behind_number < 0))))