X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathNest.cpp;h=a03aaefb168a38304e91042f1d076bc59d1a13bd;hb=9296344b9a26191a2092d175a51e357ecc35145d;hp=8d7c110a4ab3c25717827f84f779bfbef73b2e03;hpb=6956cea3235ef27a93569d4de98099c78e4322e2;p=lyx.git diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 8d7c110a4a..a03aaefb16 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -813,8 +813,8 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) cur.recordUndoSelection(); // if the inset can not be removed from within, delete it if (!cur.backspace(cmd.getArg(0) == "force")) { - FuncRequest cmd = FuncRequest(LFUN_CHAR_DELETE_FORWARD, "force"); - cur.innerText()->dispatch(cur, cmd); + FuncRequest newcmd = FuncRequest(LFUN_CHAR_DELETE_FORWARD, "force"); + cur.innerText()->dispatch(cur, newcmd); } break; @@ -827,8 +827,8 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) cur.recordUndoSelection(); // if the inset can not be removed from within, delete it if (!cur.erase(cmd.getArg(0) == "force")) { - FuncRequest cmd = FuncRequest(LFUN_CHAR_DELETE_FORWARD, "force"); - cur.innerText()->dispatch(cur, cmd); + FuncRequest newcmd = FuncRequest(LFUN_CHAR_DELETE_FORWARD, "force"); + cur.innerText()->dispatch(cur, newcmd); } break; @@ -836,8 +836,12 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) if (cur.selection()) cur.clearSelection(); else { - cmd = FuncRequest(LFUN_FINISHED_FORWARD); - cur.undispatched(); + if (cur.inMacroMode()) + cur.macroModeClose(true); + else { + cmd = FuncRequest(LFUN_FINISHED_FORWARD); + cur.undispatched(); + } } break; @@ -896,7 +900,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) int y = 0; istringstream is(to_utf8(cmd.argument())); is >> x >> y; - cur.setScreenPos(x, y); + cur.setTargetX(x); break; }