]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathRef.cpp
fix a crash when the inset containing the new word at cursor is deleted
[lyx.git] / src / mathed / InsetMathRef.cpp
index 4485304a9fc36fa48a7dad263cb35b9e8ddde545..ae1768351c426d20af4ab680e98282ad9c864222 100644 (file)
@@ -66,6 +66,7 @@ void InsetMathRef::doDispatch(Cursor & cur, FuncRequest & cmd)
                if (cmd.getArg(0) == "ref") {
                        MathData ar;
                        if (createInsetMath_fromDialogStr(cmd.argument(), ar)) {
+                               cur.recordUndo();
                                *this = *ar[0].nucleus()->asRefInset();
                                break;
                        }