On Thu, May 31, 2007 at 10:44:40PM +0200, Bernhard Roider wrote:
> Hello
> 
> in
> void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
> 
> is this still neccessary?
>       case LFUN_SELF_INSERT:
> ...
>               // Don't record undo steps if we are in macro mode and
>               // cmd.argument is the next character of the macro name.
>               // Otherwise we'll get an invalid cursor if we undo after
>               // the macro was finished and the macro is a known command,
>               // e.g. sqrt. Cursor::macroModeClose replaces in this case
>               // the InsetMathUnknown with name "frac" by an empty
>               // InsetMathFrac -> a pos value > 0 is invalid.
>               // A side effect is that an undo before the macro is finished
>               // undoes the complete macro, not only the last character.
>               if (!cur.inMacroMode())
>                       recordUndo(cur);
> 
> doing an unconditional recordUndo seems to work fine here - or i didn't 
> understand the problem.

The state during insertion of macros is a bit fragile anyway, paired
with undo it used to crash...

Andre'

Reply via email to