>>>>> "Bernhard" == Bernhard Roider <[EMAIL PROTECTED]> writes:

Bernhard> As i posted in bugzilla there is no crash anymore in current
Bernhard> svn. One remaining issue is that undo does not work as it
Bernhard> should. The attached patch addresses this, but it surely
Bernhard> affects other parts of the code (everything that uses
Bernhard> grabAndEraseSelection()), so can someone tell if it is safe
Bernhard> to apply it? Short desrciption: eraseSelection() does not
Bernhard> create an undo record but cutSelection() does (and the third
Bernhard> argument can be used to supress the copy to clipboard)

The documentation of granAndEraseSelection states:

/// Erase the selection and return it as a string.
/// Does not handle undo. Does only work if the whole selection is in mathed.
docstring grabAndEraseSelection(Cursor & cur);

If you change it to add an undo step, you'd have to audit all the
other calls to this function and check you do not create multiple
consecutive undos (this is something we have worked at removing).

The best solution is probably to have a recordUndo by hand at the
point where it is needed.

JMarc

Reply via email to