Bo Peng wrote:
> We have not done anything, and if the operators are cheap as you
> described, it is perfectly fine to me to make TocUpdate automatic.
Good, thanks.
But then it is your job to get it done. :-)
I am slowly coming back, don't ask me too much ;-)
Seriously, as we have discussed, the problem lies in 'when to update
Toc'. It is unwise to update Toc when we enter each character when
editing a caption, but there is no proper way to know 'editing is done
here'...
The proper way is to check the Buffer structure when you are editing the
caption with a call to checkBufferStructure(), maybe this is already
done. Then you also need to correct InsetCaption::addToToc(), the same
way as you did with InsetListings. Finally, you'll have to make sure
that TocBackend::updateItem() properly find the correct TocItem.
Not a lot of work but a lot of testing is required.
Abdel.