void InsetFormulaBase::edit(BufferView * bv, bool front)
{
-#warning Please have a look if this is right (Jug)
-#warning Does not look wrong... although I do not know what it is supposed to do (Andre)
edit(bv, front ? 0 : 1, 0, 0);
}
break;
case LFUN_BACKSPACE:
- // if (!mathcursor->inMacroMode() && mathcursor->pos() == 0)
- if (mathcursor->pos() == 0) {
- bv->lockedInsetStoreUndo(Undo::DELETE);
- mathcursor->pullArg(false);
- bv->updateInset(this, true);
- break;
- }
- if (mathcursor->inMacroMode())
- mathcursor->left();
- else
- mathcursor->plainLeft();
- // fall through...
+ bv->lockedInsetStoreUndo(Undo::DELETE);
+ mathcursor->backspace();
+ bv->updateInset(this, true);
+ break;
case LFUN_DELETE:
bv->lockedInsetStoreUndo(Undo::DELETE);
- if (mathcursor->pos() == mathcursor->array().size())
- mathcursor->pullArg(true);
- else
- mathcursor->erase();
+ mathcursor->erase();
bv->updateInset(this, true);
break;
//bv->owner()->message(_("math text mode toggled"));
break;
-#ifndef NO_LATEX
- case LFUN_TEX:
- if (!mathcursor->selection()) {
- mathcursor->handleFont(LM_TC_TEX);
- //bv->owner()->message(_("TeX mode toggled"));
- }
- break;
-#endif
-
case LFUN_MATH_LIMITS:
bv->lockedInsetStoreUndo(Undo::INSERT);
if (mathcursor->toggleLimits())
}
-LyXFont const InsetFormulaBase::convertFont(LyXFont const & f) const
-{
- // We have already discussed what was here
- LyXFont font(f);
-#ifndef NO_LATEX
- font.setLatex(LyXFont::OFF);
-#endif
- return font;
-}
-
-
void mathDispatchCreation(BufferView * bv, string const & arg, bool display)
{
if (bv->available()) {