diff --git a/src/Cursor.cpp b/src/Cursor.cpp index a6d799ec9c..56a9dd8722 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -1547,7 +1547,9 @@ void Cursor::niceInsert(MathAtom const & t) // If possible, enter the new inset and move the contents of the selection if (t->isActive()) { idx_type const idx = prevMath().asNestInset()->firstIdx(); - asArray(safe, prevMath().cell(idx)); + MathData ar(buffer()); + asArray(safe, ar); + prevMath().cell(idx).insert(0, ar); editInsertedInset(); } else if (t->asMacro() && !safe.empty()) { MathData ar(buffer()); diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 8cd1254098..798ca8920b 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -1844,7 +1844,7 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type const c) if (currentMode() == InsetMath::MATH_MODE && Encodings::isUnicodeTextOnly(c)) { MathAtom at = createInsetMath("text", buf); at.nucleus()->cell(0).push_back(MathAtom(new InsetMathChar(c))); - cur.niceInsert(at); + cur.insert(at); cur.posForward(); return true; }