diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 51d0f2aa71..0af4dde3c7 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -1448,8 +1448,7 @@ bool Cursor::macroModeClose() InsetMathUnknown * p = activeMacro(); p->finalize(); MathData selection; - // enclose selection in braces (bug #6270) - asArray('{' + p->selection() + '}', selection); + asArray(p->selection(), selection); docstring const s = p->name(); --pos(); cell().erase(pos()); @@ -1492,7 +1491,7 @@ bool Cursor::macroModeClose() // finally put the macro argument behind, if needed if (macroArg) { - if (selection.size() > 1) + if (selection.size() > 1 || selection[0]->asScriptInset()) plainInsert(MathAtom(new InsetMathBrace(selection))); else insert(selection);