mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Fix bug #5540: Crash in MathAtom on Undo.
No undo steps are recorded for math-macros. Now, it is also not done when we resume to edit a macro. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29685 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
22e8bd3c3e
commit
a1a9c4c4ba
@ -816,8 +816,14 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
// 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())
|
||||
cur.recordUndoSelection();
|
||||
if (!cur.inMacroMode()) {
|
||||
MathMacro const * macro = 0;
|
||||
if (cur.pos() > 0 && cmd.argument() != "\\")
|
||||
macro = cur.inset().asInsetMath()->asMacro();
|
||||
|
||||
if (!macro)
|
||||
cur.recordUndoSelection();
|
||||
}
|
||||
|
||||
// spacial handling of space. If we insert an inset
|
||||
// via macro mode, we want to put the cursor inside it
|
||||
|
Loading…
Reference in New Issue
Block a user