>>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:
Georg> Jean-Marc Lasgouttes wrote: >> Actually, when it does not have any script, the script inset should >> commit suicide and replace itself with its contents. Georg> IIRC we have that in bugzilla. Part of this one? http://bugzilla.lyx.org/show_bug.cgi?id=2582 I did not know we has so many bugs about scriptinset. Georg> No time to test right now, but I believe that the script inset Georg> suicide is correct. OK. Georg> I am not sure about the scriptinset::write changes: They are Georg> needed because asArray(asString(i)) == i should hold for all Georg> math insets. Yes. Georg> We will however get complaints if we export \sum_{} to LaTeX. Stylistic complaints, or LaTeX errors? Georg> That means that we need to make sure that an empty script inset Georg> never exists. It should not be possible to insert one, and it Georg> should commit suicide if you delete the contents of the last Georg> cell. If your patch does that then I think that it is safe. All my patch does is remove empty cells when notifyCursorLeaves is called. If I leave the cell by clicking somewhere else, the method is not invoked and the empty subscript remains. But in this case, there is a blue rectangle showing the empty superscript, so people know about it. If I click outside of the math inset LyX crashes :) I'll have a look. Georg> Can you explain the changed recordUndoInset semantics please? Previously, recordUndoInset was equivalent to running recordUndo in the enclosing inset (one level down in the cursor stack). This has the effect of saving the whole enclosing inset/paragraph, which is what we want. However, this means that, on undo, the cursor is set in this enclosing inset, and not inside the original inset. What the patch does is just run doRecordUndo manually and use the real cursor as 5th argument. JMarc