fix Undo as suggested by Alfredo

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6895 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-04-30 07:04:33 +00:00
parent 3c5caa2ce8
commit 605912d575
2 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2003-04-30 André Pönitz <poenitz@gmx.net>
* undo_func.C: revert part of yesterday's patch 2
2003-04-30 John Levon <levon@movementarian.org>
* LColor.C: s/tabular/table/

View File

@ -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<Paragraph*>(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))))