fixIfBroken();
FuncRequest cmd = cmd0;
Cursor safe = *this;
+
+ buffer()->undo().beginUndoGroup();
// store some values to be used inside of the handlers
beforeDispatchCursor_ = *this;
// are possible which would change it
beforeDispatchCursor_ = safe.beforeDispatchCursor_;
}
+ buffer()->undo().endUndoGroup();
}
InsetMathUnknown * p = activeMacro();
p->finalize();
MathData selection;
- asArray(p->selection(), selection);
+ // enclose selection in braces (bug #6270)
+ asArray('{' + p->selection() + '}', selection);
docstring const s = p->name();
--pos();
cell().erase(pos());
CursorSlice const & sl = innerTextSlice();
Text const & text = *sl.text();
Font font = text.getPar(sl.pit()).getFont(
- bv().buffer().params(), sl.pos(), outerFont(sl.pit(), text.paragraphs()));
+ bv().buffer().params(), sl.pos(), text.outerFont(sl.pit()));
return font.language()->encoding();
}
// get font at the position
Font font = par.getFont(buffer()->params(), pos,
- outerFont(sl.pit(), text.paragraphs()));
+ text.outerFont(sl.pit()));
return font;
}