]> git.lyx.org Git - features.git/blobdiff - src/mathed/formulabase.C
fix pullArg when pressing <Delete> at the end of an cell
[features.git] / src / mathed / formulabase.C
index f89d4c85b66736236487e218f28aa47843f19796..11a8cb3461609884e8acfdc0706be7c74b21ebc6 100644 (file)
@@ -472,7 +472,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
                // if (!mathcursor->InMacroMode() && mathcursor->pos() == 0)
                if (mathcursor->pos() == 0) {
                        bv->lockedInsetStoreUndo(Undo::DELETE);
-                       mathcursor->pullArg();
+                       mathcursor->pullArg(false);
                        bv->updateInset(this, true);
                        break;
                }
@@ -484,7 +484,10 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
 
        case LFUN_DELETE:
                bv->lockedInsetStoreUndo(Undo::DELETE);
-               mathcursor->Delete();
+               if (mathcursor->pos() == mathcursor->array().size()) 
+                       mathcursor->pullArg(true);
+               else
+                       mathcursor->Delete();
                bv->updateInset(this, true);
                break;