prevAtom()->asScriptInset()->ensure(up);
pushRight(prevAtom());
pos() = size();
prevAtom()->asScriptInset()->ensure(up);
pushRight(prevAtom());
pos() = size();
- idx() = up;
- return;
- }
- if (hasNextAtom() && nextAtom()->asScriptInset()) {
+ } else if (hasNextAtom() && nextAtom()->asScriptInset()) {
nextAtom()->asScriptInset()->ensure(up);
pushLeft(nextAtom());
pos() = 0;
nextAtom()->asScriptInset()->ensure(up);
pushLeft(nextAtom());
pos() = 0;
+ } else {
+ plainInsert(MathAtom(new MathScriptInset(up)));
+ pushRight(prevAtom());
- plainInsert(MathAtom(new MathScriptInset(up)));
- pushRight(prevAtom());
idx() = up;
selPaste();
return;
idx() = up;
selPaste();
return;