On Wed, Jul 20, 2005 at 10:01:22PM +0200, Jean-Marc Lasgouttes wrote:

> >On Wed, Jul 20, 2005 at 05:46:03PM +0100, John Levon wrote:
> >We can trivially skip the slow bit if we're not change tracking the
> >document. The question is what do we do if we /are/ change tracking.
> 
> Could you explain _why_ the old code works with change tracking?

Sure. When we do erase(0, size()), that uses the paragraph_pimpl erase()
function, and that updates the change table. For old text, it does not
delete the chars.

So, we only remove the paragraph is its size is now 0 - this implies
that it was a paragraph that was entirely new (blue), so can be removed
altogether. Otherwise, we have to keep it.

regards
john

Reply via email to