docstring const name = s.substr(1);
InsetMathNest * const in = inset().asInsetMath()->asNestInset();
- if (in && in->interpretString(*this, s))
+ if (in && in->interpretString(*this, s)) {
+ // end undo group that was opened before in was created
+ endUndoGroup();
return true;
+ }
MathAtom atom = buffer()->getMacro(name, *this, false) ?
MathAtom(new MathMacro(buffer(), name)) : createInsetMath(name, buffer());
else
insert(selection);
}
-
+
+ // end undo group that was opened before in was created
+ endUndoGroup();
return true;
}