From: André Pönitz Date: Thu, 18 Apr 2002 15:29:27 +0000 (+0000) Subject: fix enering of \_ X-Git-Tag: 1.6.10~19379 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=83c2be0da48489f1e99b839e50dbfe2edef4bd1d;p=features.git fix enering of \_ git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4027 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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()) {