diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index de98c76ae9..bf01e56f3b 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -614,7 +614,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action, case LFUN_SUBSCRIPT: { bv->lockedInsetStoreUndo(Undo::EDIT); - mathcursor->script((action == LFUN_SUPERSCRIPT)); + mathcursor->script(action == LFUN_SUPERSCRIPT); updateLocal(bv, true); break; } diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index 89fd224f7f..23c686e48f 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -1390,6 +1390,15 @@ bool MathCursor::interpret(string const & s) bool MathCursor::script(bool up) { + // Hack to get \\^ and \\_ working + if (inMacroMode() && macroName() == "\\") { + if (up) + interpret("\\mathcircumflex"); + else + interpret('_'); + return true; + } + macroModeClose(); selCut(); if (hasPrevAtom() && prevAtom()->asScriptInset()) {