>>>>> "Juergen" == Juergen Vigna <[EMAIL PROTECTED]> writes:
Juergen> I'm pretty sure I know now where we leak (and where we ALWAYS Juergen> leaked) with undo/redo. The problem is that we don't delete Juergen> the paragraphs we substitute. Juergen> The code is in textHandleUndo() and IMO we have to change Juergen> this peace of code: I applied you patch since it seems fine. However, this exposes a bug and crashes when one uses undo in the first paragraph of a document. For your viewing pleasure, here is what I wrote in undo_funcs.C: // put the new stuff in the list if there is one if (tmppar3){ if (before) before->next(tmppar3); else #warning Juergen, why is this needed?? (JMarc) // since tmppar3 is not yet inserted in the document, I do not see why // the getParFromID which is done by the function below makes sense. // OTOH, since you wrote the method just for this instance, I guess you // have something in mind #if 1 bv->text->ownerParagraph(tmppar3->id(), tmppar3); #else // in this case, since getParFromID is not called, the program does // not crash on trying to access buffer()->paragraph, which does not // exist anymore if we undid the first par f the document. (JMarc) bv->text->ownerParagraph(tmppar3); #endif tmppar3->previous(before); Juergen, would you care to explain what happens or (better) to provide a fix? JMarc