Jean-Marc Lasgouttes wrote:

> Actually, when it does not have any script, the script inset should
> commit suicide and replace itself with its contents.

IIRC we have that in bugzilla.

> This is what this 
> updated patch does. I checked that it works and valgrind does not
> complain.
> 
> Please test. I am unsure of the unintended consequences of this patch
> (recordUndoInset semantics changes, scriptinset suicide,
> scriptinset::write changes). Only the addition of the recordUndoInset
> calls is trivially correct.

No time to test right now, but I believe that the script inset suicide is
correct. I am not sure about the scriptinset::write changes: They are
needed because asArray(asString(i)) == i should hold for all math insets.
We will however get complaints if we export \sum_{} to LaTeX. That means
that we need to make sure that an empty script inset never exists. It
should not be possible to insert one, and it should commit suicide if you
delete the contents of the last cell. If your patch does that then I think
that it is safe.

Can you explain the changed recordUndoInset semantics please?


Georg

Reply via email to